Question
For those things of the destiny, you have become a home builder yourself. As a student of OOD in the past, you remember a very
For those things of the destiny, you have become a home builder yourself. As a student of OOD in the past, you remember a very useful pattern called decorator which would allow you to create any type of home for a new customer no matter if youve build it before or not. Every new client that comes into your business have very specific requirements on what he/she would like for the dreamed home.
Your task: Design and implement a software application for your company that allows to easily create new homes and calculate the cost for newly built homes by using the Decorator Pattern. To let the client know if the dreamed home fits his budget, the system should calculate the cost of the desired home, as well as the total area.
Use the following table to know the areas and costs
Parts of a home | Area (in square feet) | Cost ($) |
Big-Bedroom | 400 | 14651 |
Small-Bedroom | 250 | 12225 |
Bathroom | 120 | 5005 |
Living room | 560 | 5570 |
Study room | 550 | 5550 |
Kitchen | 500 | 5000 |
Walk-in closet | 50 | 2500 |
Small closet | 25 | 1000 |
Use MyHome as your abstract super base class. Create your application such that it utilizes the decorator pattern to make the system easily extensible in the sense that if for some reason your company develop a new type of element for the home, you will have to at most add one more class. In addition, the system MUST ask at runtime what the customer wants to add to the home. There are no limits on the number for each of the home parts that a customer would like to add (e,g, It maybe theres a client that wants 3 or more kitchens for the home). The most basic home BasicHome is a home that has ONLY a living room and a kitchen.
How to submit your CPSC 6119 Assignments?
You must use the NetBeans feature Export Project to Zip to zip your project for the assignment. Submit the following three items to CougarView:
(40%) the ZIP file containing all the Java source files.
(10%) the file output_lastName.txt that contains all the outputs of sample runs of your programs.
(50%) the UML class diagram in a PDF or PNG file (Your class diagram must use the standard UML notations.
NOTE:- This is all the required information.
1.Please provide java code for the above information
2.Please draw UMLclass diagram for the code
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started