Question: Problem I 30 points A car manufacturing follows certain steps to build a car. Here is the process: build car frame, add engine, driving wheels,

Problem I 30 points

A car manufacturing follows certain steps to build a car. Here is the process: build car frame, add engine, driving wheels, dashboard and energy source. There are three different cars named standard, sport and electronic.

Parts

Standard Car

Sport Car

Electronic Car

Frame

Standard

Aerodynamic

X-frame

Engine

Inline

V-Engine

Brushless

Driving wheels

FWD

AWD

RWD

Dashboard

Standard

Premium

Digital

Energy

Standard

Enhanced

Battery

Note that a buyer can choose different car, but the construction process is the same. Use builder pattern to construct the car by building each part and putting them all together. The main program asks buyer to choose a car, then display the car information on the screen. For example, if the buyer chooses Standard car, the result should show on screen as following

Standard car:

Frame: Standard

Engine: Inline

Driving: FWD

Dashboard: Standard

Energy: Standard

  1. Give the UML class diagram.

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

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!