INF2009F - Workshop 5
INF2009F - Workshop 5
Once you have identified the “noteworthy concepts” required in the RestEasy Hotels
Reservation and Billing system, call on a tutor to discuss the relevance of each one
you have identified before continuing. Classes we decide to keep will now move
into stage two.
[14 Marks]
2. Understanding the information stored by a class goes a long way towards
understanding the role of the object in the system. Below is a set of 7 tables you can
use to document the attributes (pieces of specific information) for each class.
For example, in the video store we would have a class Video with attributes such as
Video Number, Title, Distributor, Release Date.
Write the name of each class in the first row of a table.
Now try and identify an attribute that will act as a unique identifier (like a video
number or employee number) and write that into the second row.
Finally, identify as many other attributes (pieces of specific information) you
feel the system should maintain about that particular object class. Repeat this
exercise for all object classes approved above. This exercise will take some time as
you will need to walkthrough the business activities described in the case study to
determine all the data attributes required. It is very important to document attributes
at this stage as they will assist in your understanding of what data each class
contains and therefore what role it plays in the system. Often you will hear
comments like “I thought we were storing the video hire details in the customer
class, not the video class” (incidentally both are wrong). We will not have enough
time to complete the identification of all attributes today but finding the main ones
will be sufficient to develop the first cut Class Diagram.
Makes
1 0..*
Customer Order
It is important that you work in rough until you have developed and refined your
model. You may want to keep your rough workings but only transcribe your solution
onto the space provided on the next page when you are comfortable with your
solution.
Time for this exercise 30 minutes
You now have a domain class diagram that documents the important concepts required by
the RestEasy Hotels Reservations and Billing System. We now need to refine this
diagram to represent the software classes involved in this subsystem and to ensure it can
accommodate the requirements documented in your use case model.
[20 Marks]
4. Now we are in the last stage of the process – refining our class diagram to produce an
analysis class diagram. Use the space on the next page to draw your analysis
class diagram. Start with your domain class diagram and look for the following
opportunities to better define these concepts as software classes. Use your
lecture notes where you need clarity on an issue and understand that not all of these
refinements will be required in this process:
Decompose complex concepts
Include “generic or specification” classes
Identify where “tables” are required.
Are there any associations that carry data and need associative classes
Look for opportunities for reuse (Inheritance)
Are there strong associations requiring Aggregation or Composition
Once you have implemented these refinements, you are ready to perform a walkthrough to
test the class diagram and see if it contains the classes, attributes and associations to
support your user requirements. We do not have detailed use case narratives at our
disposal but certain requirements have been taken out of the various use cases and listed
below. Take each item on the list and test whether your class diagram can support it.
1. Enquire about the room rate for a specified period (remember rates are seasonal –
low, medium or high).
2. Check room availability for a particular date.
3. Check whether a guest is currently in the hotel and indicate the room he/she is
occupying.
4. Allocate rooms the night before the guests arrive.
5. Have the flexibility to allow accounts to be generated across multiple rooms and
where rooms are shared by separate guests.
6. Identify which receptionist recorded a reservation and processed a payment.
7. Keep tabs on regular guests and those who are in “bad standing” (unpaid bills or
unacceptable behaviour).
8. Allow companies to negotiate special discounts on room rates for their employees.
9. Decommission 20 rooms over July to allow for refurbishment.
Time for this exercise 40 minutes