paul.gibson@int-edu.eu
http://www-public.it-sudparis.eu/~gibson/Teaching/CSC7322/
The catalog is accessible to all clients; but only the library employees
can make changes to the catalogue record: by adding/removing
documents and clients; and changing the status of documents and clients.
Problem Expression
Clients can be added and removed from the library (by library staff). Each
client has a name, address and unique identification number.
Problem Expression …
Documents are CDs, DVDs and books. There are CDs that are also a
special kind of audio book. Every document has a location in the library
(which notes the physical location of where it must be stored while not
being used), and a unique identifier. There may be multiple copies of the
same document in the library. No client can borrow more than 1 copy of
the same document at any one time. Every document has the following
information: title, author, year.
Books also have publisher information, a genre (crime, SF, etc) and the
number of pages.
CDs also have information regarding the type of music (rock, pop etc)
For DVDs we also record the length of the film and the age
restriction/classification
At the beginning of each day, the list of overdue books is updated. Clients
who return all borrowed documents that are overdue can immediately
borrow another document (without waiting for the next day).
A subscribed client who has more than 5 overdue books in total loses
their subscription and automatically becomes unsubscribed.
Problem Expression …
For each type of document (book, cd, dvd) we can see the
current number of borrowing instances
Problem Expression …
For each type of document (book, cd, dvd) we can see the
total number of borrowing instances
Problem Analysis
Step 1
Problem Analysis
Step 2
Step 3
Step 4
analyse the different states that a client can be in, and specify
an invariant property
Step 5
Step 6