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.

  1. Give the UML class diagram.

  2. Provide the implementation code of the UML class diagram given in question 3) in the programming language of your choice.

  3. 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!