Time table

advertisement
Soal 3 OOSE pert13
Time table
The train timetable contains descriptions of itineraries. An itinerary is characterized by an
itinerarynumber and a list of stops; a stop is characterized by the name of a station, a
time, a label `D' for departure or `A' for arrival, and a collection of weekdays on which
the itinerary calls in at the stop. For each station the address and the presence of a
restaurant and a parking for bicycle are registered.
On a given date an itinerary is performed by a train. A train has a driver, zero or more
ticket collectors, and some rolling stock: either a locomotive and several carriages, or one
or more trains. All rolling stock has an identificationnumber. For the personell, name and
address are administered.
Software has to be designed that supports electronic access to the information in the
timetable, but it should also be able to list the usage of personell and rolling stock on a
given date.
1. Create a UML class diagram of the situation described above. Clearly indicate in
which classes values are stored, in which classes methods are placed to retrieve
and manipulate values and which classes are abstract.
2. Some trains have a restaurant car. On such a train a cook and at least one waiter
are always present. Extend the diagram to express this.
3. It is necessary to use the software for administering intercity bus services as well.
Someone proposes to to make Bus a subclass of Train. This would cause a
problem. Describe this problem
4. What is a better way to model bus itineraries? (More answers are possible)
Download