Question: In Java: As part of an architectural design program, write a main method that prompts the user to enter length and width dimensions for each

In Java:

  • As part of an architectural design program, write a main method that prompts the user to enter length and width dimensions for each room in a proposed house so that total floor space can be calculated for the entire house.

  • After each length/width entry, ask the user if there are any more rooms.

  • Print the total floor space.

  • Here is the beginning of the code. You need to complete the rest of the program:

    public static void main(String[] args)

    {

    Scanner stdIn = new Scanner(System.in);

    double length, width; // room dimensions

    double floorSpace = 0; // house's total floor space

    String response; // user's y/n response

    do

    {

    System.out.print("Enter the length: ");

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!