Question: Problem II 30 points The same description as Problem I, suppose a car dealer has three cars (standard, sport and electronic) on display. Use Factory
Problem II 30 points
The same description as Problem I, suppose a car dealer has three cars (standard, sport and electronic) on display. Use Factory method pattern to implement it. Display car information on the screen based on buyers choice.
Welcome, which car are you interested in? Please choose 1, 2 or 3
If a user chooses number 1, then shows
Standard car:
Frame: Standard
Engine: Inline
Driving: FWD
Dashboard: Standard
Energy: Standard
Show similar message if user chooses number 2.
-
Give the UML class diagram.
-
Provide the implementation code of the UML class diagram given in question 3) in the programming language of your choice.
-
Now for the same problem description, you have used two different patterns to implement. Please state the difference of factory and builder.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
