Question: Programming Assignment #1 Write a program in Java that will take the dimensions of two different homes and calculate the total square footage. The program

Programming Assignment #1

Write a program in Java that will take the dimensions of two different homes and calculate the total square footage. The program will then compare the two values and print out a line of text appropriately stating whether it is larger or smaller than the other one.

You, the developer, will choose the dimensions of each room (hard coded values in the source code) in each home; however, each home must contain at least 4 rooms for calculating. You may choose to add more, but the minimum each can have is 4.

Example output:

House 1 is larger than House 2 by xxxx square feet.

Replace "xxxx" with the difference in square feet between the two homes.

Continue adding to programming assignment #1.

After the comparison of the size of each home is printed out to the screen, take the dimensions you supplied in the code and print out the label of the home, each room in that home and the dimensions associated with that room along with the total square footage of that home. This assignment utilizes string concatenation and variable assignment.

Example of output:

House 1 is larger than House 2 by xxxx square feet

House 1

Living Room: 12x10

Kitchen: 11x7

Bedroom: 10x8

Bathroom: 8x6

Bedroom: 10x10

Total square footage: xxxx sq. ft.

House 2

Living Room: 14x11

Kitchen:14x10

Bedroom: 11x10

Bathroom:10x8

Bedroom:12x9

Bedroom:9x7

Total square footage: xxxx sq. ft.

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!