[SDU Logo]   Dept. of Mathematics and Computer Science
University of Southern Denmark Phone/Email Directory | Maps

 DM519 - 2012
Weekly Notes


Weekly Note 3

Hand-In #2, Tuesday May 1 at noon (12:00)

At IMADAAirlines there are two kinds of seats:

  • Professor class - with nice leather seats and gorgeous airs hostesses.
  • Student class - with old, ugly, small seats, but free beer.

The planes are very small and there are only five, N=5, seats of each kind.

Reservation of seats are done using a central computer system connected to several terminals. Booking operators sit at the terminals and take requests from travellers.

To book a seat, a traveller chooses a kind of seat (Professor or Student) and the operator reserves a seat of the right kind (if possible) and issues a ticket. If no more seats of the requested kind is available, the traveller can of course try to book a seat of the other kind.

A system is required to avoid that more seats are booked than possible. Travellers can only select the class they want, not exactly which seat, i.e., you only need to count the number of seats available of each kind.

  1. Construct an FSP model of the system and demonstrate that your model does not permit too many bookings.
  2. Implement your model in Java. Document your code and the model-implementation correspondence by adding the corresponding model snippets as comments into your Java code.

(Hint: It is only necessary to model a few terminals/operators. Remember to setup appropriate locking mechanisms)

Discussion Section, Wednesday April 25 at 12:15 in U26

  1. Hand-In #1
  2. [MK] 4.1 - 4.3
  3. [MK] 5.1 - 5.3