Question: Using java and use software design pattern, Description: Suppose that we have many kind of vehicles: Car, Moto, Truck, and Bicycle. These vehicles share the

Using java and use software design pattern,

Using java and use software design pattern, Description: Suppose that we have

Description: Suppose that we have many kind of vehicles: Car, Moto, Truck, and Bicycle. These vehicles share the characteristics: Color, Make, Model, Year, Price, and NumberOfPassengers. The Car and Truck have additional attributes: Engine, NumberOfDoors and VIN (Vehicle Identification). The Moto has additional attributes: Engine and VIN (Vehicle Identification). The Bicycle has an additional attribute: BicycleType (RoadBicycle or MountainBicycle using an enumeration 1. Define the hierarchy of products (vehicles). 2. Use the factory method pattern to create the different vehicles. 3. Define the abstract factory pattern associated to the vehicle creation. In this part, you need to create a factory for each kind of vehicles. 4. For the Car, we specialize by creating subclasses for the different kind of cars (SportsCar. LuxuryCar). We define a decorator to add some accessories to the car: MusicSystem. SunRoof. TouchScreen... 5. Define a single class Vehicle Shop, representing a shop for selling and buying vehicles. A unique instance can be created for this shop. 6. Define the main class to instantiate the VehicleShop and the other classes to test them

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!