In this problem you will calculate the area of a house and compare it with another house to see which one is bigger. House1 vs. House2 We need to have a struct that has width and length in it. This struct represents a rectangular room. From room we need to define: Bathroom, Livingroom, Bedroom and Kitchen. An example of the struct and Bathroom, Livingroom, Bedroom and Kitchen is shown below. Also, it is shown how to set value of Bathroom Length and Width- values are assumed in feet. House area is in Square Feet (sqrft) and can be calculated by adding all room areas together in sqrft. Program example: Struct room { Length; Width: }; Struct room Bathroom1 , Livingroom1, Kitchen1, Bedroom1; Bathroom1.Length=10; Bathroom1.Width=7; Now Given: House1 is comprised of: Bedroom1 (L=15,W=10) Bathroom1 (L=10,W=7) Kitchen1(L=15, W= 10) Livingroom1 (L=25,W=20) House2 is comprised of: Bedroom2_1 (L=10, W=10) Bedroom2_2(L=10, W=12) Kitchen2(L=16,W=10) Livingroom2 (L=15,W=12) Calculate each House area and determine which is the larger House and report it promptly.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

In this problem you will calculate the area of a house and compare it with another house to see

which one is bigger. House1 vs. House2

We need to have a struct that has width and length in it. This struct represents a rectangular

room. From room we need to define:

Bathroom, Livingroom, Bedroom and Kitchen.

An example of the struct and Bathroom, Livingroom, Bedroom and Kitchen is shown below.

Also, it is shown how to set value of Bathroom Length and Width- values are assumed in feet.

House area is in Square Feet (sqrft) and can be calculated by adding all room areas together in

sqrft.

Program example:

Struct room {

Length;

Width:

};

Struct room Bathroom1

, Livingroom1,

Kitchen1, Bedroom1;

Bathroom1.Length=10;

Bathroom1.Width=7;

Now Given:

House1 is comprised of:

Bedroom1 (L=15,W=10)

Bathroom1 (L=10,W=7)

Kitchen1(L=15, W= 10)

Livingroom1 (L=25,W=20)

House2 is comprised of:

Bedroom2_1 (L=10, W=10)

Bedroom2_2(L=10, W=12)

Kitchen2(L=16,W=10)

Livingroom2 (L=15,W=12)

Calculate each House area and determine which is the larger House and report it promptly.

 
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education