Internal Code: MAS3422
Case Study Assignment:
When a car approaches an entry barrier, its presence is detected by a sensor under the road surface, and a ‘Press Button’ display is flashed on the control pillar. The ordinary customer must press a button on the control pillar, and a ticket is printed and issued. The ticket must be printed within five seconds. A ‘Take Ticket’ display is flashed on the control pillar. If the car park is full, no ticket is issued, and a ‘Full’ display is flashed on the control pillar. If a vehicle leaves the car park, then the ‘Press Button’ display is activated again where there is
a vehicle waiting. When the customer pulls the ticket from the control pillar, the barrier is raised. The ticket issued to each ordinary customer has a barcode on it. The barcode has a number on it and the date (dd/mm/yyyy) and time (hh/mm/ss) of entry to the car park. The number, date and time of entry are also printed on the ticket in human-readable form. The details of the ticket are stored: ticket no., issue date, issue time, issuing machine. The number of vehicles in the car park is incremented by 1 and a check is made against the capacity of the car park. If the car park is full, then a display near the entrance is switched on to say ‘Car Park Full’, and no further tickets are issued until a
vehicle leaves the car park. The season ticket holder does not press the button but inserts his or her season ticket into a slot on the control pillar. A check is made that the season ticket is valid for this car park and has not expired, that it is a weekday and that the season ticket holder is not recorded as having already entered this car park and not left. If all these checks are passed, then the barrier is raised.
The checks must take no longer than five seconds. A record is made of the time of entry for that season ticket holder. A sensor on the other side of the barrier detects when the car has passed and the barrier is lowered.
Questions:
• validating an OO design through the construction of a prototype
• converting design diagrams into program code
• preparing project documentation
• developing presentations, and through peer review to reflect on their own practice and improve their design.