Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

There are four options for wall cover (Ceramic Tile = 1; Paneling = 2, Wallpaper = 3; and paint = 4) each with a cost

There are four options for wall cover (Ceramic Tile = 1; Paneling = 2, Wallpaper = 3; and paint = 4) each with a cost per square foot The program will ask for input and read in the budget in dollars and cents, the cost per square foot for each of the different wall options and also ask for which one the customer prefers where 0 means the customer does not care and 1-4 if they have a specific preference.

Output the users preference, their budget, if they got their preference, and what they did get. Also how much budget is left.

You will be graded on how well you map this to methods and how good the comments are explaining what the program does.

Use the following for data (it is the same as HW 3 so you should get the same selection answers for flooring as you get there.

First renovation project (THREE DOORS, ONE BOOKSHELF, NO WINDOWS)

o Room is 12 feet long, 12 feet wide, and 12 feet high

o Door 1 is 2 feet wide by 10 feet high

o Door 2 is 3 feet wide by 5 feet high

o Door 3 is 3 feet wide by 5 feet high

o Bookshelf is 8 feet long by 10 feet high by 2 feet deep

o No windows

Second renovation project (3 WINDOWS, 2 BOOKSHELFS, NO DOORS)

o Room is 24 feet long, 12 feet wide, and 8 feet high

o Window 1 is 2 feet wide by 6 feet high

o Window 2 is 3 feet wide by 5 feet high

o Window 3 is 8 feet wide by 5 feet high

o Bookshelf 1 is 8 feet long by 6 feet high by 3 feet deep

o Bookshelf 2 is 3 feet long by 6 feet high by 2 feet deep

o No doors

Third renovation project (ONE DOOR, 2 WINDOWSS, ONE BOOKSHELF)

o Room is 12.75 feet long, 11.25 feet wide, and 12 feet high

o Door is 1.95 feet wide by 10 feet high

o Window 1 is 2.5 feet wide by 5 feet high

o Window 2 is 6.8 feet wide by 7.2 feet high

o Bookshelf is 8 feet long by 6 feet high by 3 feet deep

***********************************************

here is the prgram and you just have to add the wall prefrences and simplify the code by methods.

here is your program : --------------->>>>>>>>

import java.util.Scanner;

public class DemoRoom { private static double paintingCostPerSqFt=1; private static double flooringWithLinoleumTileCost=1; private static double flooringWithCarpetCost=2; private static double flooringWithHardwoodCost=3; private static double flooringWithCeramicTileCost=4; private static double r_length; //Room Length private static double r_width ; //Room Width private static double r_height; //Room Height private static double d_width; //Door Width private static double d_height; //Door Height private static double door_area = 0; private static double w_width; //Window1 Width private static double w_height; //Window1 Height private static double window_area = 0; private static double b_width; //Bookshelf Width private static double b_height; //Bookshelf Height private static double b_depth; //Bookshelf Depth private static double self_area = 0; private static double self_floor_area = 0;

private static int customerPreferenceRenovation1=0; private static double customerBudgetRenovation1; private static int customerPreferenceRenovation2=0; private static double customerBudgetRenovation2; private static int customerPreferenceRenovation3=0; private static double customerBudgetRenovation3; public static void main(String args[]) { //To get the user input from the console Scanner sc = new Scanner(System.in); //Carpeting and Painting includes for Room, Door and Windows //Getting the measurements from the user through console for all three - Room, Door, Windows, BookShelf //Getting User Inputs for a Room System.out.println("Enter Room length, width and height :"); r_length = sc.nextDouble(); r_width = sc.nextDouble(); r_height = sc.nextDouble(); //Getting User Inputs for a Door System.out.println("Enter How many door : "); int no_of_door = sc.nextInt(); for(int i = 0;i

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

T Sql Window Functions For Data Analysis And Beyond

Authors: Itzik Ben Gan

2nd Edition

0135861446, 978-0135861448

More Books

Students also viewed these Databases questions

Question

c. Determine the confidence intervals of the linearised parameters.

Answered: 1 week ago