Here is the class diagram we did in class.
CardReader is an abstract class that cannot be instantiated except through its children.It containst all the fields and methods that are common to the busreaders--that is methods which have the same implementation.
TrainCardReader and BusCardReader inherit from CardReader.
CardReader has an aggregation relationship to Card. The CardReader class contains an instance of the Card Class, but the Card class has an existence separate from the container.
Card aggregates Trip (as do the readers)
TrainCardReader and BusCardReader implement the interface IReader which means they must provide a body for its abstract methods
No comments:
Post a Comment