Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Need help creating this java program. If you could add comments, I would appreciate it. Problem You are to write a program that calculates the
Need help creating this java program. If you could add comments, I would appreciate it.
Problem You are to write a program that calculates the cost of flooring. Your program assumes that the user has three different rooms with three different shapes of square, circle and triangle. The user wants to get quotes for wood, tile and carpet flooring. Your program needs to collect the following info 1. Measurements for each room 2. Cost per square feet for wood 3. Cost per square feet for tile 4. Cost per square feet for carpet 5. Refer to sample output, your output should match this exactly Solution You need to create two separate java files, Floor.java and FloorClient.java. Before you start any coding, you must first complete the lab worksheet. When you begin to code, create a FloorDriver.java file with a main method. In this method you will test your helper class. Formatting your output: to format the output to two decimal points you should use System.out.printf Below is an overview of the lab activities 1. Week 1 a. Complete lab worksheet b. Create FloorClient.java with main method only Create Floor.java with the first method you would like to implement d. c. Use CloorClient.java to test the method you implemented Continue c and d for the rest of the lab period e. 2. Week 2 a. Finish implementing methods in Floor.java b. Once the helper class is complete, remove the test code from FloorDriver.java and implement the driver class Test your program and check it against the sample output c. Deliverables Upload your completed worksheet (Chapter3LabWorksheet.docx), Floor.java and FloorDriver.java Welcome to Nature flooring We can give you a quote on the flooring that you are looking floor Just give us some measurements and we will promptly give you the quote How many times will be using the software --> 3 Enter the price of the flooring per square feet Wood - 10 Tile-- 15 Carpet--> 3 Calculating the circular floor cost. Please enter the measurments Radius -- > 13.5 Wood 5725.55 Tile 8588.33 Carpet 1717.67 Calculating the rectangular floor cost. Please enter the measurments Width -- > 9.5 Height --> 16 Wood 1520.00 Tile 2280.00 Carpet 456.00 Calculating the triangular floor cost. Please enter the measurments Base -- Height --> 7.18 5 Tile 292.50 Wood Carpet 58.50 195.00 Enter the price of the flooring per square feet Wood --> 5.50 Tile--> 7.75 Carpet--> 1.25 Calculating the circular floor cost. Please enter the measurments Radius -- > 10 Wood 1727.88 Tile 2434.73 Carpet 392.70 Calculating the rectangular floor cost. Please enter the measurments Width --8.9 Height --> 10 Wood 489.50 Tile 689.75 Carpet 111.25 Calculating the triangular floor cost. Please enter the measurments Base -- Height --> 10 > 18 Wood 495.00 Tile 697.50 Carpet 112.50 Enter the price of the flooring per square feet Wood --> 12.35 Tile-- 20.45 Carpet--2.50 Calculating the circular floor cost. Please enter the measurments Radius -- > 7.5 Wood 2182.43 Tile 3613.81 Carpet 441.79 Calculating the rectangular floor cost. Please enter the measurments width -- > 6 Height -> 10 Wood 741.00 Tile 1227.00 Carpet 150.00 Calculating the triangular floor cost. Please enter the measurments Base-- Height 20 Wood 1235.00 Tile 2045.00 Carpet 250.00 Good ByeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started