Write the sequence diagrams for this case study
Abuja Municipal Area Council (AMAC) operates seven car parks in the centre of AMAC. The Council has a requirement for a new system to control its car parks. This system must provide for the day-to-day operation of each car park-issuing tickets, handling payment and controlling barriers-and the management of car parks-recording problems, issuing season tickets and monitoring service level agreements with the security company that guards the car parks.
Operational System
The car park operational system controls entry to and exit from a car park and payment for car parking.
There are three types of users: ordinary customers, who pay for their use of each car park at the time they use it; season ticket holders, who pay a fixed amount in advance for parking for three, six or twelve months in a specific car park; and Government official cars. While the government official cars are exempted from paying to park, they are allowed into these car parks for free on weekdays only with no reserved parking space for their vehicles. Season ticket holders are allocated parking spaces in designated areas that are not available to ordinary customers from Monday to Friday. Season tickets are for weekdays only; the designated spaces are available to all customers at week-ends. No more than 10% of the spaces in a car park are allocated to season ticket holders.
Entry to the Car Park
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 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.
The ticket issued to each ordinary customer has a bar code on it. The bar code has a number on it and the date (ddmmyyyy) and time (hhmmss) 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.
Payment
When the ordinary customer is ready to leave, he or she must go to a pay station to pay. The ticket is inserted into a slot, and the bar code is read. The ticket bar code information is compared with the stored information. If the dates or times are not the same, the ticket is ejected, and the customer is told (via an LCD display) to go to the office. In the office, the attendant has a bar code reader and can check a ticket. Typically the problem is damage to the bar code on the ticket, and the attendant can use the office system to calculate the charge, take payment and validate the ticket (see below).
At the pay station, if the ticket dates and times are the same as the bar code dates and times, then the current date and time are obtained, and the duration of the stay in the car park is calculated. From this the car park charge is calculated and displayed on the LCD display. Calculation and display of the charge must take no more than two seconds.
There are two tariffs: a short-stay tariff and a long-stay tariff. These include the rates for weekdays from 8.00 am to 6.00 pm, and lower rates for entry after 6.00 pm and at week-ends. Each car park uses either the short-stay tariff or the long-stay tariff.
If no change is available, this information is displayed on the LCD display.
The customer must then insert notes or coins to at least the amount of the charge. Each note or coin is identified as it is inserted and the value added to an accumulated amount and displayed on the LCD display. Invalid notes are ejected from the note slot. Invalid coins are dropped through into the return tray. A message is displayed on the LCD display.
As soon as the amount accumulated exceeds the charge, the ticket is validated. The current date and time are added to the stored data for that ticket (payment date, payment time).
If the amount entered exceeds the charge and change is available, then the amount of change is calculated and that amount of change is released into the return tray. Otherwise, no change is given. In either case, a message is displayed on the LCD display.
The ticket has the payment date and time printed on it and is ejected from the ticket slot.
A message is displayed telling the customer to press the 'Receipt' button if they need a receipt. If they press this button, a receipt is printed and ejected into the receipt tray. The receipt shows the Council address, address of the car park, VAT number, date and amount paid.
A message is displayed for the customer telling them to take the ticket back to their car and leave the car park within 15 minutes.
Leaving the Car Park
When the customer drives up to the exit barrier, the car is detected by a sensor, and an 'Insert Ticket' display is flashed on the control pillar. The customer must insert the ticket. The bar code is read and a check is made that no more than 15 minutes have elapsed since the payment time for that ticket. If more than 15 minutes have elapsed, an intercom in the control pillar is activated and connected to the attendant in the car park office. The customer can talk to the attendant, and the attendant can view the details of the ticket on his or her computer. The attendant can activate the barrier remotely, for example if there is a queue to get out and the customer is likely to have been reasonably delayed.
If no more than 15 minutes have elapsed, the barrier is raised. A sensor on the other side of the barrier detects when the car has passed and the barrier is lowered.
The number of vehicles in the car park is decremented by 1 and a check is made against the capacity of the car park. If the car park was full, then the display near the entrance is switched to say 'Spaces', and a check is made to see if any vehicles are waiting. If they are, then the control pillar for the first waiting vehicle is notified. If the driver of the vehicle waiting there does not press the button (for example, because they have backed out and left), then the control pillar for the next waiting vehicle is notified.
At any time, the attendant can view the status of a pay station or a barrier control pillar. Once a connection is made, the status is updated every 10 seconds.
Season ticket holders do not have to go to the pay station, when they are ready to leave the car park, they go to the exit and insert their season ticket into a slot on the exit barrier control pillar. The barrier is raised and a record is made of the time at which the season ticket holder left.
Security Visit Recording
The City Council has a contract with security companies to visit the car parks at regular intervals. The contract specifies the number of visits per day to each car park and the minimum duration of each visit. Each car park has an office to which the security guards have access. In the office is a card reader similar to the one used for reading season tickets in the control pillars. When a security guard arrives in a car park, he or she puts a card into the card reader and the date and time of arrival is recorded. When the security guard leaves, he or she puts the card in again, and the departure time is recorded. (This card also allows security guards to enter and leave the car park in the same way as season ticket holders. However, this is not used to record the arrival and departure of security guards, as they may not be able to enter with a vehicle if there is a queue of cars at the barrier.)
Currently, the City Council uses two security companies, but could use more or only one in the future. Each security company is issued with a specific number of cards, depending on the number of car parks they are responsible for. Each security company is responsible for specific car parks.
Management System
The car park management system handles the aspects of managing the car parks that are not part of the day-to-day operational system.
Fault Recording
There is a requirement for a fault recording system to be used to record all problems with car parks. Most faults are expected to be with equipment (barriers, card readers, security cameras etc.) although they can include things such as broken windows and doors. Details of the fault and the date and time at which it was reported are recorded. If the fault applies to equipment or some other aspect of the operational system, there is a requirement that the maintenance company must be notified straight away. For other problems, the Council's direct labour organisation will be notified.
The date and time when faults have been fixed must also be recorded, so that the Council can monitor the service level agreement with the maintenance company. There is a requirement to be able to produce a monthly statistical report of all faults, which organisation they were allocated to and how long they took to be fixed.
Security SLA
There is a similar requirement in relation to the service level agreement with the security companies. A monthly exception report is required showing any occasions where the number of visits per day to a car park fell below the contracted number or where the duration of a visit was shorter than the contractual minimum.
Season Tickets
A sub-system is required for selling season tickets. Each season ticket is issued to a named individual or company, and the address and contact telephone number of that person or company is recorded. Each season ticket is valid for three, six or twelve calendar months, and the issue date and expiry date are recorded. The information about season tickets has to be available to the operational system for validation of access to the car parks.
A renewal form must be sent to each season ticket holder two weeks before their season ticket is due to expire. If a season ticket is renewed before its expiry date, then the new expiry date is set as three, six or twelve months from the existing expiry date.
A record must be kept of how much usage each season ticket holder makes of their car park in terms of how much it would have cost them to pay for the car park as an ordinary customer. This information is used by the City Council for its annual review of season ticket prices. A report showing this information is required.
Other Management Requirements
A record must be kept of all tickets for a year. When the Council carries out its annual review of ticket prices, it needs to be able to estimate the level of income for the coming year by calculating the charges based on proposed new tariffs using the previous year's data.
Managing operational costs of the car parks-staffing, cost of equipment, cost of maintenance agreements, cost of security etc.-is not part of the requirements for this system. This is handled elsewhere in the Council's financial systems.