Answered step by step
Verified Expert Solution
Link Copied!

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:
1. Create a MakingArchitecturalPlan interface for declaring the make plan function
2. Create a function that defines how to calculate the estimate of the raw materials
3. Create the Architect class which will call and define the MakingarchitecturalPlan interface
4. Create the Cost estimation Adapter which will call the class that estimates the cost of the raw materials
5. 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

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

Larry Ellison Database Genius Of Oracle

Authors: Craig Peters

1st Edition

0766019748, 978-0766019744

More Books

Students also viewed these Databases questions