Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider a scenario where you have an Architect who can create architectural plans of buildings but cannot calculate a rough estimation of how much of
Consider a scenario where you have an Architect who can create architectural plans of buildings but cannot calculate a rough estimation of how much of the raw materials can be consumed in the construction.
Now lets say that a customer wants to save money and does not want to hire an engineer to estimate the amount of raw materials and the cost. The customer requests the architect to create an architectural plan and estimate the cost of the raw materials as well. Create an Adapter so that the architect can estimate the total cost of raw materials using his plan building skills.
The solution for this can be built through the following steps:
Create a MakingArchitecturalPlan interface for declaring the make plan function
Create a function that defines how to calculate the estimate of the raw materials
Create the Architect class which will call and define the MakingarchitecturalPlan interface
Create the Cost estimation Adapter which will call the class that estimates the cost of the raw materials
Write the client code that will just call the Adapter class and the make plan function
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