subject

In this lab, you complete a partially written Java program that is provided for you. The program, which was written for a furniture company, prints the name of the furniture item, its retail price, its wholesale price, the profit made on the piece of furniture, a sale price, and the profit made when the sale price is used.
1. Open the file named Furniture. java using Notepad or the text editor of your choice.
2. The file includes variable declarations and output statements. Read them carefully before you proceed to the next step.
3. Design the logic that will use assignment statements to first calculate the profit, then calculate the sale price, and finally calculate the profit when the sale price is used. Profit is defined as the retail price minus the wholesale price. The sale price is 25 percent deducted from the retail price. The sale profit is defined as the sale price minus the wholesale price.
Perform the appropriate calculations as part of your assignment statements.
4. Save the source code file in a directory of your choice, and then make that directory your working directory.
5. Compile the program.
6. Execute the program. Your output should be as follows:

• Item Name: TV Stand
• Retail Price: $325.0
• Wholesale Price: $200.0
• Prot: $125.0
• Sale Price: $243.75
• Sale Prot: $43.75

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 17:10, jasoncarter
3. consider the following class definitions: class smart class supersmart: public smart { { public: public: void print() const; void print() const; void set(int, int); void set(int, int, int); int sum(); int manipulate(); smart(); supersmart(); smart(int, int); supersmart(int, int, int); private: private: int x; int z; int y; int secret(); }; }; . which private members, if any, of smart are public members of supersmart? a. which members, functions, and/or data of the class smart are directly accessible in class supersmart?
Answers: 2
image
Computers and Technology, 22.06.2019 11:30, LindseyN1
One subtask in the game is to roll the dice. explain why is roll the dice an abstraction.
Answers: 3
image
Computers and Technology, 22.06.2019 20:00, bowmanari2154
What is used to analyze and summarize your data without graphical support
Answers: 1
image
Computers and Technology, 23.06.2019 04:31, mona92
Which of the following is not a way in which trees benefit the environment? a. they remove a significant amount of carbon dioxide from the atmosphere. b. they remove a significant amount of oxygen from the atmosphere. c. their roots hold soil in place, reducing rates of erosion. d. they remove ozone and particulates from the atmosphere. select the best answer from the choices provided a b c d
Answers: 1
You know the right answer?
In this lab, you complete a partially written Java program that is provided for you. The program, wh...

Questions in other subjects:

Konu
English, 12.11.2020 01:00
Konu
Health, 12.11.2020 01:00
Konu
Mathematics, 12.11.2020 01:00