Problem Statement

You are hired to develop a system that keeps track of all drivers and vehicles in a company. The company has many drivers and many different types of vehicles: bike, car, bus, truck, etc. A vehicle may have a driver assigned to it or no driver assigned to it. A driver is assigned to handle maximum one or no vehicle at a time. Sample attributes are listed below:

  • Vehicle: Vehicle number, type, capacity, driver assigned
  • Driver: driver id, name, vehicle assigned.

The system must be able to perform the following functions:

  • Create/Delete drivers and vehicles
  • Assign/Unassign a driver to/from a vehicle
  • List all drivers (all attributes must be shown)
  • List all vehicles (all attributes must be shown)
  • List all instances of a specified type of vehicle (all attributes of the instance must be shown)

Note that 2 marks is allocated for Composition. A sample code for composition is listed below: See image.

You are strongly advised to complete the assignment with composition but without inheritance and polymorphism before the mid trimester break, then convert the program to incorporate inheritance and polymorphism after the mid trimester break.

Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.