1.3-Object-Georienteerd-Programmeren

Transport company

We are going to build a system for a small transport company which can transport both passengers and goods. There will be a main class called TransportCompany. Your task is to avoid code duplication and make the design future-proof, e.g. it should be easy to extend the program with new functionality.

This assignment is mostly about the data model and your choice of interfaces and/or inheritance. We will therefore keep the drawing and printing in the application to a minimum. Since this assignment is about modelling, we strongly recommend drawing the class diagram first. Read the description below carefully, draw the class diagram and then start implementing.

The main functionality should be:

Therefore, implement at least the following methods:

What you need to know about the transport company: