100% Guaranteed Results


PCS – Let’s practice inheritance and composition Solved
$ 19.99
Category:

Description

5/5 – (1 vote)

Inheritance
Create a base class named Car, create a sub-class, MiniVan.
Add something special for MiniVan like numberOfSeats, with a special method specific for the Minivan.

Composition
Create a class Engine. A Car should have an instance of an Engine.
Write methods for Car and Engine, now allow access to the Engine methods through the Car.

Write a Main method in a ParkingLot class that has an array of Cars and some of them are MiniVans Loop through the cars, call methods to manipulate the Engine and check which cars are MiniVans, cast to MiniVan and call MiniVan method

Reviews

There are no reviews yet.

Be the first to review “PCS – Let’s practice inheritance and composition Solved”

Your email address will not be published. Required fields are marked *

Related products