Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions

Question

1. Define the concept of brands and branding.

Answered: 1 week ago

Question

What is conservative approach ?

Answered: 1 week ago

Question

What are the basic financial decisions ?

Answered: 1 week ago

Question

4. What are the current trends in computer software platforms?

Answered: 1 week ago