Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

There are various buildings such as houses, college buildings, commercial buildings, etc. We will take this scenario. Each building has the outer wall called siding

There are various buildings such as houses, college buildings, commercial buildings, etc. We will take this scenario. Each building has the outer wall called siding which can be made of bricks, halo bricks or vinyl, cement, etc. Each building can have rooms such as Houses have living room, bedrooms, kitchen, etc. Commercial buildings have general rooms made with different square feet, so that different businesses can rent them for their purposes. These rooms also can have features such as water plumbing present/not present, gas plumbing present/not present, etc. You are to develop an application to create one house and one commercial building. You will ask the user questions for house and commercial building and create rooms. Finally, you will calculate the total square feet of the house and the commercial building. The scenario and question are explained more below.
For reference, I have also uploaded a class / app diagram.
Design a class called "Building" with private attributes "siding" and "squarefeets". Design two classes called "House" and "Commercial" inheriting "Building".
Implement these classes in an application as follows:
Create one house and one commercial building (for simplicity, for the exam. In real application you will have iterations and options to create more houses and other buildings)
For House, ask the user:
Size of Living Room, Size of kitchen, Size of dining and Size of the bedroom (for simplicity of exam, we will assume there is only one bedroom).
Total the sizes and set it in squarefeet of the object.
Same way, ask the user for commercial building:
Imagine that this commercial building has 3 rooms. Ask the Size for each of those rooms from the user and find the total and set it in the squarefeet of the object.
You should display total square feet of both the house and the commercial building. Design and coding of classes and inheriatance. creating instances and application of those instances. "Write a java code"
image text in transcribed

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

Essential SQLAlchemy Mapping Python To Databases

Authors: Myers, Jason Myers

2nd Edition

1491916567, 9781491916568

More Books

Students also viewed these Databases questions

Question

Is there just cause to dismiss Bonita? Explain your answer.

Answered: 1 week ago

Question

=+5 Does this case provide an example of the future for IHRM?

Answered: 1 week ago

Question

=+4 How did it affect HR?

Answered: 1 week ago