Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

java a. Complete laD Worksnee b. Create FloorClient.java with main method onty c. Create Floor.java with the first method you would like to implement d.

java image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
a. Complete laD Worksnee b. Create FloorClient.java with main method onty c. Create Floor.java with the first method you would like to implement d. Use CloorClient.java to test the method you implemented e. Continue c and d for the rest of the lab period 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 6 CSC 15 Chapter 3 lab Before turning in your work, make sure that you have looked at the provided rubric. 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 unt oard 1. Measurements for each room 2. Cost per square feet for wood 3. rses Cost per square feet for tile 4. Cost per square feet for carpet endar 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. No Select an box Formatting your output: to format the output to two decimal points you should use System.out.printf. Help Below is an overview of the lab activities 1. Week 1 a. Complete lab worksheet b. Create FloorClient.java with main method only c. Create Floor.java with the first method you would like to implement d. Use SloprClient Jav to test the method you implemented e. Continue c and d for the rest of the lab period 2. Week2 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 FloorDriver.java Make sure to put import java.util.scanner at the top of this class Return Type void Parameters Summary Method Name main Create a Scanner object Call the run method Stringl) args . Asks the user how many times that they will be using the software and loops that many times. Performs the run following within the loop: o Prompt for price of wood per square foot o Prompt for price of tile per square foot o Prompt for price of carpet per square foot o Call the methods below to calculate and display the costs for the different shaped flooring Prompts for the radius of the circular floor Calls appropriate method from the Floor class to calculate the circular floor cost Receives a Scanner object and the prices per square foot for wood, tile and carpet .Prompts for the width and height of the rectangular floor . Calls appropriate method from the Floor class to calculate the rectangular floor cost Receives a Scanner object and the prices per square foot for wood, tile and carpet Prompts for the base and height of the triangular floor Calls appropriate method from the Floor class to calculate the triangular floor cost Receives a Scanner object and the prices per square foot Calculates the total cost for wood, tile and carpet for the circular portion Receives the radius and the cost per square foot for wood, tile and carpet N/A .Uses one of the methods above to determine the area Uses another one of the methods above three times to calculate the three different costs . Uses a method below to display the costs to the screen Calculates the total cost for wood, tile and carpet for the triangular portion . Receives the base, height and the cost per square . Uses one of the methods above to determine the . Uses another one of the methods above three . Uses a method below to display the costs to the foot for wood, tile and carpet area times to calculate the three different costs screen Displays costs to the screen for wood, tile and carpet Receives three parameters (cost for wood, tile and carpet) N/A Refer to the sample output for more information Displays a description of your program Explain what the program does Refer to the sample output N/A . . Chapter 3 Lab Worksheet Complete the tables below prior to starting on any java code. Think of meaningful variable names and use the correct casing (camelCase). You will also need to give your return types, parameter names/data types (put "none" if there will be none) and list any formulas that you will be using. Floorjava Formula Summary MethodReturn Type Parameters Name AreaC Calculates the area of a circle (Use Math.PI) Receives the radius e Returns the area . Calculates the area of a rectangle e Receives the width and length . Returns the area e Calculates the area of a triangle . Receives the base and height . Returns the area areaRect double Look online for the formula double totalArea, double pricePerSqFt Calculates the cost to cover the given area. Receives total area and price per square feet . Returns the total cost N/A Calculates the total cost for wood, tile and carpet for the rectangular portion Recelives the height, width and the cost per square foot for wood, tile and carpet Uses one of the methods above to determine the area Uses another one of the methods above three times to calculate the three different costs Uses a method below to display the costs to the e AT&T LTE 12:20 PM @(Di 70% Lab 3 Output.txt 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>18 Height ->10 Tile 697.50 Wood Carpet 112.50 495.00 Enter the price of the flooring per square feet Wood12.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 Dashboard Calendar To Do Notifications Inbox AT&T LTE 12:21 PM @ 70% Lab 3 Output.txt width -- > 8.9 Height10 Wood Tile Carpet 111.25 489.50 689.75 Calculating the triangular floor cost. Please enter the measurments Base ->18 Height 10 Tile 697.50 Carpet 112.50 Wood 495.00 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 -> 10 Height 20 Wood 1235.00 Tile 2045.00 Carpet 250.00 Good Bye Dashboard Calendar To Do Notifications Inbox

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2014 Administration

Authors: Adam Jorgensen, Bradley Ball

1st Edition

111885926X, 9781118859261

More Books

Students also viewed these Databases questions

Question

What methods do communication scholars use to conduct research?

Answered: 1 week ago