We are having a few problems understanding this case study for a Class diagram, its only revision so its not homework or anything of the sorts, we have a few possible solutions but would appreciate some thoughts on possible answers.
A new software system is required for scheduling the buses in a random place. Buses travel along different routes. Each route is made up of any number of links, each of which is defined by two points – one start point and one end point.
There are four types of links – timing links, network links, journey definition links and routing links. Points are differentiated as stop points (where passengers enter or leave), relief points (where drivers stop or start their journeys) and parking points (where vehicles are parked). Parking points can be further differentiated as garage points or reserve points.
How would this scenario be shown in a class diagram?
Thanks
When creating a class diagram you have to ask yourself what are the entities that make up your domain. These are the basis for your class diagram:
Bus,Route,Link, etc… These are your classes. Your description also shows that there are places where inheritance can be used.After you have identified your classes, you define their relations: a
Bustravels along aRoute, aRouteis composed ofLinks, etc. The relations can be defined first as abstract relations and then refined into more specific relations (aggregation/composition).Then you have to ask yourself what other classes are needed to execute the business logic of your problem – in this case, bus scheduling. So you would probably need a
Schedulerclass (at least) and some helper classes, depending on the problem you are trying to solve.