SJSU CMPE 232 - An Analysis Pattern for Reservation and Use of Reusable

Unformatted text preview:

1An Analysis Pattern for Reservation and Use of Reusable EntitiesEduardo B. Fernandez and Xiaohong YuanDept. of Computer Science and Engineering,Florida Atlantic UniversityBoca Raton, FL 33431ed | xhyuan @cse.fau.eduAbstract This analysis pattern describes how to make a reservation for a reusable entity and itssubsequent use. Its requirements are expressed by Use Cases and its description uses classmodels, state diagrams, and sequence diagrams. The pattern corresponds to a minimalsemantic unit. Copyright 1999, Eduardo B. Fernandez. Permission is granted to copy for the PloP 1999 conference.All other rights reserved.1. IntroductionWe present here an analysis pattern that describes the making of a reservation for areusable entity and its subsequent use. This pattern is in the category of what we havecalled semantic analysis patterns [Fer98], because they emphasize semantic aspects of theapplication model, as opposed to improving flexibility.We consider this type of patterns useful to start the modeling process from therequirements. For example, identifying a few patterns in the requirements produces aninitial model that can be used as a guideline for the rest of the design. These patterns canalso be used to develop frameworks and components.This pattern emphasizes fundamental aspects of reservations and leaves out extensions,exceptions, and varieties; these can be added later to define a pattern language forreservations.2. ProblemA client (person or institution) needs to reserve a reusable entity (hotel room, vehicle,seat in a show) so that subsequently he can make use of it. The entities are limited inavailability and can be grouped into equivalence classes or categories.All of these situations imply a request for some type of entity for some specific date ofuse. If an entity of the requested type is available, it is booked for the client. A specificentity is assigned at the moment of use and a record of use describes the use of the entity.The reserved entities are reusable; that is, they are not acquired by the customer, he onlyhas the right to use them for a certain period of time. This aspect implies that the record of2use has also the role (explicit or implicit) of contract, in that it makes the user responsiblefor returning the entity in good condition after use.Figure 1 shows a class diagram for a customer booking a hotel room. The associationbetween classes Customer and Room describes each reservation made for a customer. Theassociation class Reservation describes the information normally included in a reservation.The class Availability describes the structure of the rooms andtheir occupancy.3. ForcesThe following forces apply here:• The normal analysis objectives apply to the solution. An analysis model must be afaithful representation of the requirements and must not include any implementationdetails.• Fundamental semantics. The pattern must describe a fundamental semantic unit. Thisimplies simplicity and the ability to describe a variety of situations. This approach hasalso been used in [Ngu98], where it is called a "minimal" application.• Model representation of real-life documents. Reservations and use records arenormally recorded as paper documents as well as in their software form.Forces for the pattern language would also include convenient and efficient client service(e.g. by including queueuing facilities), reliability (e.g., by including provisions forexceptional cases).4. SolutionnameaddressphoneNocreditInfo.CustomerFigure 1. Booking an hotel roomhotelnumberRoomBook_for*111..*avail_roomssRoom_AvailabReservationdateconfirmation#status34.1 RequirementsThe solution corresponds to the realization of the following Use Cases:• Make a reservation. The actor is a customer (person or institution). The customerrequests an entity of a certain type for given period of time starting at a given date. Ifavailable, the entity is booked. The corresponding information is recorded in areservation document.• Use a reserved entity. The actors are the same as in making a reservation. Before theentity is used, a record of use is created. When the use is completed, the entity isreturned and made available again.• Modify a reservation. A change is made to an existing reservation. This implies todetermine availability and cancel the old reservation.• Cancel a reservation. An existing reservation is canceled. Some institution policiesmay apply to define the consequences of the cancellation.Note that the functionality required to modify a reservation is available in the making andcanceling of reservations. Also, the exceptional flows of these Use Cases have been leftout.4.2 Class modelFigure 2 is an analysis class diagram for the realization of these Use Cases. This diagramdistinguishes the type of entity being reserved (class Entity_Type), from the individualentity assigned at the moment of use (class Entity). A UseRecord class describes the useof the entity. The Availability class describes the generic idea of checking and keepingtrack of occupancy. The Reservation class includes the information normally kept inbookings. The association between Reservation and UseRecord indicates the fact that theuse record is based on the reservation information.4.3 Dynamic aspectsFigures 3 and 4 show the state diagrams for the most significant classes. For example, areservation can be in Created and Confirmed states. Figure 5 shows a sequence diagramshowing the making of a reservation and its later use.5. Consequences This pattern has the following consequences: • It can be applied to reservation of rooms in hotels, conference rooms in a building,seats for flights, seats for shows, books and videotapes, etc. This variety ofapplications indicates that the pattern contains fundamental aspects of this problem. Itis also a simple pattern, relatively easy to understand. • Every aspect of the Use Cases is represented in this pattern, and no implementationaspects are included.4 • The class model includes explicitly classes for Reservation and UseRecord, the twobasic documents used in these systems. This makes it easy to keep history ofreservations and use of the corresponding entities. The role of the Use Record as alegal contract is also explicit. However, not all the situations described by this pattern are exactly alike:• One gets a physical ticket when reserving a place in a show or in a flight but not whenreserving a vehicle or a room (although one may get a confirmation


View Full Document

SJSU CMPE 232 - An Analysis Pattern for Reservation and Use of Reusable

Download An Analysis Pattern for Reservation and Use of Reusable
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view An Analysis Pattern for Reservation and Use of Reusable and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view An Analysis Pattern for Reservation and Use of Reusable 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?