1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Margarita [4]
3 years ago
6

Class Product {

Computers and Technology
2 answers:
KatRina [158]3 years ago
8 0

Answer:

C) 400.0: 100.0

Explanation:

prt.price = 200 and updatePrice method is called which makes it 400 & new price is as declared 100.

Both the numbers are double hence

400.0 : 100.0 is printed.

blagie [28]3 years ago
5 0

Answer:

D. Compilation Fails

Explanation:

There is an error in the program, which if not correct will hinder the successful compilation of the program and will give a compilation error

The error is at doucble newPrice = 100;

The data type has to be spelt correctly to ensure the program is executed successfully

To declare variable newPrice of type double and also initialize it to 100, the right syntax is double newPrice = 100;

After correcting the error, the program will run correctly and produce the following result:

400.0 : 100.0

At line 2 of the main method, an instance of class Product is declared "Product prt = new Product();"

This allows values to be passed between the main method and the class

In class Test

price takes its value from newPrice (in the main method)

So, when newPrice is 100.0

price = 100.0 * 2

price = 200.0

After which product.price is calculated

product.price takes its value from prt.price (in the main method)

So, when prt.price is 200.0

product.price=product.price + price (Recall that price is 200.0; as illustrated above)

product.price = 200.0 + 200.0

product.price = 400.0

At line 5 of the main method, an instance of class Test is declared "Test t = new Test ();"

The next line t.updatePrice ( prt, newPrice);  assigns the calculated values to prt and newPrice respectively

prt = 400.0

newPrice = 100.0

The output is done on the next line: System.out.println(prt.price + " : " + newPrice);

prt.Price = prt = 400.0 and newPrice = 100.0

Hence, the output will be done in the following order 400.0 : 100.0

You might be interested in
I will mark brainalist! ​
netineya [11]

Answer:

I would say

1) Weather Station

2) (word missing)

3) Robot perihen devices

4) Bit

5) Primary Key

6) Algorithim

7) Flow Chart

8) Table Wizard

9) Design View

10) SIMS

5 0
3 years ago
One of 34 possible _________________ can be assigned to each axis of classification in the seven-character code.
Ray Of Light [21]

One of 34 possible <u>Values</u> can be assigned to each axis of classification in the seven-character code.

<h3>Understanding Coding Guidelines</h3>

This question is taken from Conventions in ICD-10-PCS Official Guidelines for Coding and Reporting.

According to the convention A2 in the guidelines, One of 34 possible values can be assigned to each axis of classification in the seven-character code.

They are the numbers 0 to 9 and all the alphabets with the exception of I and O.

An example is where the fifth axis of classification specifies the approach, seven different approach values are currently used to specify the approach.

Read more about Coding at; brainly.com/question/16397886

7 0
3 years ago
What character is best in super smash bros ultimate??
fenix001 [56]
Yoshi Strong
Young Link Best
Zelda Good
Zero Suit Samus Good
6 0
3 years ago
Read 2 more answers
What are ACLs and why are they used?
aniked [119]
A acl is a injury cuz
8 0
2 years ago
Read 2 more answers
Explain the difference between * and ** with examples ​
Volgvan

Answer:

So it's cleared now, ,both are not same, = is an Assignment Operator it is used to assign the value of variable or expression, while ==is an Equal to Operator and it is a relation operator used for comparison (to compare value of both left and right side operands)

8 0
3 years ago
Other questions:
  • This device manages network resources:<br> bridge <br> gateway<br> NIC <br> server
    15·1 answer
  • What are the three most important jobs of an operating system?
    8·1 answer
  • Sophisticated modeling software is helping international researchers (1 point) create more intricate screenplays and movie scrip
    9·1 answer
  • What kind of service is typically not offered by hosting service​
    6·1 answer
  • List the instructions of how you would make a PBJ sandwich as a series of five (5) steps (tasks) in the first column Complete th
    14·1 answer
  • When proposing a plan in detail for video production phases, fundraising, and outreaching, which section will you use to make su
    14·2 answers
  • help:(What are the uses of various lights? How are they all different? How do you decide on their usage? How can you use natural
    9·1 answer
  • What was the first computer name brand
    12·2 answers
  • A process spawning or initiating another process is referred to as _____
    8·1 answer
  • automatic updates are better than non-automatic updates for a system because it might be better for patching the os as they narr
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!