modify this code to add color and Style eclipse-work a - Eclipse IDE File Edit Source Refactor
Fantastic news! We've Found the answer you've been seeking!
Question:
modify this code to add color and Style
Transcribed Image Text:
eclipse-work a - Eclipse IDE File Edit Source Refactor Navigate Search Project Run Window Help DH #C TO 2 9 100 11 12 13 14 150 refrigerator.java X 6 public class refrigerator { 7 8 16 17 18 19 20 21 22 23 240 25 26 27 28 29 300 31 32 33 34 35 36 37 38 39 P ◄ double price; String brand; double temperature; refrigerator (double price, String brand, double temperature) { Q } double coolingtemp() { if(this.temperature>25 || this.temperature<10) { return (double) 15; } this.price=price; this.brand-brand; this.temperature temperature; } } } else { } void display () { } return this.temperature; String str=""; str="Brand: "+brand+"\nPrice: $"+price+"\nTemperature is set to "+coolingtemp(); System.out.println("Refrigerator Details: \n==== public static void main(String[] args) { refrigerator rs-new refrigerator (2100.00, "Samsung Large Capacity, 18); rs.display(); H OL ====\n"+str); Writable Smart Insert 61 Problems @ Javadoc Declaration Console X Brand: Samsung Large Capacity Price: $2100.0 Temperature is set to 18.0 31:74:749 • <terminated> refrigerator [Java Application] C:\Users\12532\.p2\pool\plugins\org.eclipse.justj.openjdk.h Refrigerator Details: ========== ============ O Q -0 XXEAN - D A 8 f) D X 9:11 PM 10/8/2022 eclipse-work a - Eclipse IDE File Edit Source Refactor Navigate Search Project Run Window Help DH #C TO 2 9 100 11 12 13 14 150 refrigerator.java X 6 public class refrigerator { 7 8 16 17 18 19 20 21 22 23 240 25 26 27 28 29 300 31 32 33 34 35 36 37 38 39 P ◄ double price; String brand; double temperature; refrigerator (double price, String brand, double temperature) { Q } double coolingtemp() { if(this.temperature>25 || this.temperature<10) { return (double) 15; } this.price=price; this.brand-brand; this.temperature temperature; } } } else { } void display () { } return this.temperature; String str=""; str="Brand: "+brand+"\nPrice: $"+price+"\nTemperature is set to "+coolingtemp(); System.out.println("Refrigerator Details: \n==== public static void main(String[] args) { refrigerator rs-new refrigerator (2100.00, "Samsung Large Capacity, 18); rs.display(); H OL ====\n"+str); Writable Smart Insert 61 Problems @ Javadoc Declaration Console X Brand: Samsung Large Capacity Price: $2100.0 Temperature is set to 18.0 31:74:749 • <terminated> refrigerator [Java Application] C:\Users\12532\.p2\pool\plugins\org.eclipse.justj.openjdk.h Refrigerator Details: ========== ============ O Q -0 XXEAN - D A 8 f) D X 9:11 PM 10/8/2022
Expert Answer:
Answer rating: 100% (QA)
There are some syntax errors and typos in your code Ive identified a few issues and corrected them b... View the full answer
Related Book For
Java How To Program Late Objects Version
ISBN: 9780136123712
8th Edition
Authors: Paul Deitel, Deitel & Associates
Posted Date:
Students also viewed these programming questions
-
a) What would be the third term? What would be the next to last term? What would be the last term? b) What would be the second term? What would be the next to last term? What would be the last term?...
-
Two springs, with force constants k1 and k2, are connected in parallel, as shown in FIGURE 7-29. How much work is required to stretch this system a distance x from the equilibrium position? m-
-
In November 2019, Uber was once again in the news for systemic issues that put both its passengers and its drivers at risk. The City of London denied an extension to its taxi operating license under...
-
Pileri Industries shipped goods to Consolidated Industries, Inc., via a common carrier. The goods were lost in transit. Pileri claimed that the sale was a shipment contract, thus putting the risk of...
-
The adjusted trial balance of Tsai Company shows the following data pertaining to sales at the end of its fiscal year October 31, 2014: Sales Revenue $820,000, Freight-Out $16,000, Sales Returns and...
-
The Relational Model and Logical Design (a) In the context of the relational data model, describe the following terms: (i) relation (ii) primary key (iii) foreign key (iv) null ...
-
AD Enterprise was established in June 2023. During the first month of the operation of the business, these events and transactions occurred: June 1 Mr. AD invested $100,000 cash in exchange into the...
-
Shown below is a segmented income statement for Drexel-Hall during the current month: All stores are similar in size, carry similar products, and operate in similar neighborhoods. Store 1 was...
-
The payoff matrix of economic profits above displays the possible outcomes for Bob and Jane who are involved in game of whether or not to advertise. After each player chooses his or her best strategy...
-
You have recently been hired to advise the owners of Kentfield Insect Ltd. (KIL), which operates in a perfectly competitive industry. KIL is currently producing at a point where market price equals...
-
Lamar is looking to refinance his $300,000 mortgage. He has already locked-in a new mortgage at 4.00% APR for the next 360 months at Bank One, and closes on the new mortgage next week. Prior to...
-
Interpret the following elasticities for products A, B and C, by specifying whether (a) the product is normal or prestige (b) whether it is elastic, or inelastic etc. Product A : Elasticity of demand...
-
If f(x,y)=Sinyx then find dyn enwolf dx
-
Read and analyse the following case study, "R&D and Operations: How to Make Them Talk". Then answer the question requirements at the end of the case study write-up. Case Study: "R&D and Operations:...
-
Cable Corporation is 60% owned by Anna and 40% owned by Jim, who are unrelated. It has noncash assets, which it sells to an unrelated purchaser for $100,000 in cash and $900,000 in installment...
-
Modify the program to include a method named updatePerson in class PersonQueries. The method should update an existing entry in the database. Provide an Update Button. When the user presses this...
-
Give the method header for each of the following methods: a) Method Hypotenuse, which takes two double-precision, floating-point arguments side1 and side2 and returns a double-precision,...
-
Modify the Tip Calculator app to allow the user to enter the number of people in the party. Calculate and display the amount owed by each person if the bill were to be split evenly among the party...
-
Crane l uses 10 kJ of energy to lift a 50 kg box to the roof of a building. Crane 2 uses 20 kl to lift a 100 kg box the same distance. Which crane is more efficient? A. Crane 1 B. Crane 2 C. Both...
-
Christina throws a javelin into the air. As she propels it forward from rest, she does 270 J of work on it. At its highest point, its gravitational potential energy has increased by 70 J. What is the...
-
Two samples of ideal gas, sample 1 and sample 2, have the same thermal energy. Sample l has twice as many atoms as sample 2. What can we say about the temperatures of the two samples? A. T>T B. T = T...
Study smarter with the SolutionInn App