Question: 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

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.

Instructions

  1. Ensure the file named Furniture.java is open.
  2. The file includes variable declarations and output statements. Read them carefully before you proceed to the next step.
  3. Design the logic and write the Java code that will use assignment statements to:
    • Calculate the profit (profit) as the retail price minus the wholesale price
    • Calculate the sale price (salePrice) as 25 percent deducted from the retail price
    • Calculate the sale profit (saleProfit) as the sale price minus the wholesale price.
  4. Execute the program by clicking Run. Your output should be as follows:

    Item Name: TV Stand Retail Price: $325 Wholesale Price: $200 Profit: $125 Sale Price: $243.75 Sale Profit: $43.75

Complete a partially written Java program that is provided for you. Theprogram, which was written for a furniture company, prints the name of

5 6 7 1 // This program calculates profits and sales prices for a furniture company. 2 3 public class Furniture 4 { public static void main(String args[]) { String itemName = "TV Stand"; 8 double retailPrice = 325.00; double wholesalePrice = 200.00; 10 double salePrice; 11 double profit; 12 double saleprofit; 13 14 // Write your assignment statements here. 15 9 16 17 18 19 20 21 System.out.println("Item Name: " + itemName); System.out.println("Retail Price: $" + retailPrice); System.out.println("Wholesale Price: $" + wholesalePrice); System.out.println("Profit: $" + profit); System.out.println("Sale Price: $" + salePrice); System.out.println("Sale Profit: $" + saleProfit); System.exit(); 22 23 24 25 26 27 System.exit()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!