UML  Use of UML Diagrams as an aid to Database Design Specification
Overview <ul><li>What is Modeling? </li></ul><ul><li>What is UML? </li></ul><ul><li>A brief history of UML </li></ul><ul><...
Modeling <ul><li>Describing a system at a high level of abstraction </li></ul><ul><ul><li>A model of the system </li></ul>...
Object Oriented Modeling
What is UML? <ul><li>UML stands for “Unified Modeling Language” </li></ul><ul><li>It is a industry-standard graphical lang...
Why UML for Modeling <ul><li>Use graphical notation  to communicate more clearly than natural language (imprecise) and cod...
History of UML
Types of UML Diagrams <ul><li>Use Case Diagram </li></ul><ul><li>Class Diagram </li></ul><ul><li>Sequence Diagram </li></u...
Use Case Diagram <ul><li>Used for describing a set of user  scenarios </li></ul><ul><li>Mainly used for capturing user req...
Use Case Diagram (core components) Actors:   A role that a user plays with respect to the system,including human users and...
Use Case Diagram(core relationship) Association:   communication between an actor and a use case; Represented by a solid l...
Use Case Diagram(core relationship) Extend :  a dotted line labeled <<extend>>  with an arrow toward the base case.   The ...
Use Case Diagrams Library System Borrow Order Title Fine Remittance Client Employee Supervisor <ul><li>  A generalized des...
Class diagram <ul><li>Used for describing  structure and behavior  in the use cases </li></ul><ul><li>Provides a conceptua...
Class representation <ul><li>Each class is represented by a rectangle subdivided into three compartments </li></ul><ul><ul...
OO Relationships <ul><li>There are two kinds of Relationships </li></ul><ul><ul><li>Generalization  </li></ul></ul><ul><ul...
Subtype2 Supertype Subtype1 OO Relationships:   Generalization - Generalization expresses a parent/child relationship amon...
OO Relationships:  Association <ul><li>Represent relationship between instances of classes </li></ul><ul><ul><li>Student e...
Association: Multiplicity and Roles University Person 1 0..1 * * Multiplicity Symbol Meaning 1 One and only one 0..1 Zero ...
OO Relationships:   Composition Class W Class   P 1 Class   P 2  Composition:  expresses a relationship among instances  o...
OO Relationships:  Aggregation Class   C Class E 1 Class E 2   AGGREGATION Aggregation:  expresses a relationship among in...
Aggregation vs. Composition <ul><ul><li>Composition  is really a strong form of  aggregation   </li></ul></ul><ul><ul><ul>...
Sequence Diagram:Object interaction Self-Call : A message that an  Object sends to itself. Condition:  indicates when a me...
Sequence Diagrams – Object Life Spans <ul><li>Creation </li></ul><ul><ul><li>Create message </li></ul></ul><ul><ul><li>Obj...
Sequence Diagram <ul><li>Sequence diagrams demonstrate the behavior of objects in a use case by describing the objects and...
  Interaction Diagrams: Collaboration diagrams User Catalog Reservations start 1: look up 2: title data 3 : [not available...
State Diagrams State Diagrams show the sequences of states an object goes through during its life cycle in response to sti...
<ul><li>Sample </li></ul><ul><li>Implementation of UML </li></ul>
Hotel Reservation [ USE CASE] <ul><li>(1) Identify the actors . </li></ul><ul><li>(2) Identify the responsibilities of eac...
Hotel Reservation [ USE CASE] <ul><li>Identify the actors . </li></ul><ul><ul><ul><ul><li>staff  </li></ul></ul></ul></ul>...
Hotel Reservation [ USE CASE] <ul><li>(2) Identify the responsibilities of each role . </li></ul><ul><li>Staff includes ma...
Hotel Reservation [ USE CASE] <ul><li>i) front desk </li></ul><ul><ul><ul><ul><li>accept reservation </li></ul></ul></ul><...
Hotel Reservation [ USE CASE] <ul><li>ii) room service </li></ul><ul><ul><ul><ul><li>provide room service </li></ul></ul><...
Hotel Reservation [ USE CASE] <ul><li>iv) guest  </li></ul><ul><ul><li>check in  </li></ul></ul><ul><ul><li>check out </li...
Hotel Reservation [ USE CASE] <ul><li>(3) Identify the use cases by considering what the system can offer . </li></ul><ul>...
Hotel Reservation [ USE CASE] <ul><li>Consider any other possible situations. </li></ul><ul><ul><li>You can also consider ...
Hotel Reservation [ USE CASE]
Hotel Reservation  [ Analysis Class Diagram ] <ul><li>(1) Identify the nouns and model the concepts as classes and adjecti...
<ul><li>(1) Identify the nouns and model the concepts as classes and adjectives as attributes. </li></ul><ul><li>(2) Ident...
Hotel Reservation  [ Analysis Class Diagram ] <ul><li>Example  </li></ul><ul><li>$250 for a twin room </li></ul><ul><li>De...
Hotel Reservation  [ Analysis Class Diagram ] <ul><li>i) Abstracting the nouns from the description gives the following : ...
Hotel Reservation  [ Analysis Class Diagram ] <ul><li>ii) Organizing the nouns and adjectives gives the following : </li><...
Hotel Reservation  [ Analysis Class Diagram ] <ul><li>Reservation </li></ul><ul><ul><ul><li>Reservation identity </li></ul...
Hotel Reservation  [ Analysis Class Diagram ] <ul><li>Guest </li></ul><ul><ul><li>name </li></ul></ul><ul><li>Single room ...
Hotel Reservation  [ Analysis Class Diagram ] <ul><li>Direct corporate billing payment </li></ul><ul><ul><li>amount,  corp...
Hotel Reservation  [ Analysis Class Diagram ] <ul><li>(3) Test the 3 relationships between the classes, has a or part of, ...
Hotel Reservation  [ Analysis Class Diagram ] <ul><li>Aggregation </li></ul><ul><ul><li>laundry use is a set of objects . ...
Hotel Reservation  [ Analysis Class Diagram ] <ul><li>(4) Consider the range, default and limitations of each attribute . ...
[Statecharts] <ul><li>(1) Consider the state changes induced by the use case. </li></ul><ul><ul><li>Now that we have a set...
<ul><li>cancel reservation </li></ul><ul><ul><li>The reservation object goes from Rooms  Not checked in if rooms are assig...
Activity Diagram <ul><li>The activity diagram shows the actual steps performed in the use case. It looks like a flowchart ...
Continuation….
Uml report
Uml report
Uml report
Uml report
Uml report
Uml report
Uml report
Uml report
Upcoming SlideShare
Loading in …5
×

Uml report

2,253 views

Published on

Published in: Technology, Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,253
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
135
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • Introduce myself
  • Overview of my presentation: - Essence of modeling, UML, history of UML, Basics of UML, UML modeling tools
  • 1. Describing the system at abstract level to comprehend its complexity 2. Necessary to manage complexity Good for quick understanding of the systems Less chances of conflicting views b/w end-user and system designers
  • Evolution of analysis and design techniques Transition from structured programming to object oriented programming
  • . What does UML stand for? . Industry standard . Graphical notation . Modeling tool … simplifies software design process
  • . More precise than natural language … less detailed than source code . Not dependent on any language . Standardized by various groups
  • History: - Rumbaugh – OMT – object modeling technique Jacobson – OOSE UML … unified approach since 1995 UML 1.5 current … UML 2.0 by the end of 2004
  • Uml report

    1. 1. UML Use of UML Diagrams as an aid to Database Design Specification
    2. 2. Overview <ul><li>What is Modeling? </li></ul><ul><li>What is UML? </li></ul><ul><li>A brief history of UML </li></ul><ul><li>Understanding the basics of UML </li></ul><ul><li>UML diagrams </li></ul><ul><li>UML Modeling tools </li></ul><ul><li>Example </li></ul>
    3. 3. Modeling <ul><li>Describing a system at a high level of abstraction </li></ul><ul><ul><li>A model of the system </li></ul></ul><ul><ul><li>Used for requirements and specifications </li></ul></ul><ul><li>Is it necessary to model software systems? </li></ul>
    4. 4. Object Oriented Modeling
    5. 5. What is UML? <ul><li>UML stands for “Unified Modeling Language” </li></ul><ul><li>It is a industry-standard graphical language for specifying, visualizing, constructing, and documenting the artifacts of software systems </li></ul><ul><li>The UML uses mostly graphical notations to express the OO analysis and design of software projects.  </li></ul><ul><li>Simplifies the complex process of software design </li></ul>
    6. 6. Why UML for Modeling <ul><li>Use graphical notation to communicate more clearly than natural language (imprecise) and code(too detailed). </li></ul><ul><li>Help acquire an overall view of a system. </li></ul><ul><li>UML is not dependent on any one language or technology. </li></ul><ul><li>UML moves us from fragmentation to standardization . </li></ul>
    7. 7. History of UML
    8. 8. Types of UML Diagrams <ul><li>Use Case Diagram </li></ul><ul><li>Class Diagram </li></ul><ul><li>Sequence Diagram </li></ul><ul><li>Collaboration Diagram </li></ul><ul><li>State Diagram </li></ul><ul><li>This is only a subset of diagrams … but they are most widely used </li></ul>
    9. 9. Use Case Diagram <ul><li>Used for describing a set of user scenarios </li></ul><ul><li>Mainly used for capturing user requirements </li></ul><ul><li>Work like a contract between end user and software developers </li></ul>
    10. 10. Use Case Diagram (core components) Actors: A role that a user plays with respect to the system,including human users and other systems. e.g.,inanimate physical objects (e.g. robot); an external system that needs some information from the current system. Use case: A set of scenarios that describing an interaction between a user and a system, including alternatives . System boundary : rectangle diagram representing the boundary between the actors and the system.
    11. 11. Use Case Diagram(core relationship) Association: communication between an actor and a use case; Represented by a solid line. Generalization : relationship between one general use case and a special use case (used for defining special alternatives) Represented by a line with a triangular arrow head toward the parent use case.
    12. 12. Use Case Diagram(core relationship) Extend : a dotted line labeled <<extend>> with an arrow toward the base case. The extending use case may add behavior to the base use case. The base class declares “extension points”. <<extend>> Include : a dotted line labeled <<include>> beginning at base use case and ending with an arrows pointing to the include use case. The include relationship occurs when a chunk of behavior is similar across more than one use case. Use “include” instead of copying the description of that behavior. <<include>>
    13. 13. Use Case Diagrams Library System Borrow Order Title Fine Remittance Client Employee Supervisor <ul><li>  A generalized description of how a system will be used.  </li></ul><ul><li>  Provides an overview of the intended functionality of the system </li></ul>Boundary Actor Use Case
    14. 14. Class diagram <ul><li>Used for describing structure and behavior in the use cases </li></ul><ul><li>Provides a conceptual model of the system in terms of entities and their relationships </li></ul><ul><li>Used for requirement capture, end-user interaction </li></ul><ul><li>Detailed class diagrams are used for developers </li></ul>
    15. 15. Class representation <ul><li>Each class is represented by a rectangle subdivided into three compartments </li></ul><ul><ul><li>Name </li></ul></ul><ul><ul><li>Attributes </li></ul></ul><ul><ul><li>Operations </li></ul></ul><ul><li>Modifiers are used to indicate visibility of attributes and operations. </li></ul><ul><ul><li>‘ +’ is used to denote Public visibility (everyone) </li></ul></ul><ul><ul><li>‘ #’ is used to denote Protected visibility (friends and derived) </li></ul></ul><ul><ul><li>‘ -’ is used to denote Private visibility (no one) </li></ul></ul><ul><li>By default, attributes are hidden and operations are visible. </li></ul>
    16. 16. OO Relationships <ul><li>There are two kinds of Relationships </li></ul><ul><ul><li>Generalization </li></ul></ul><ul><ul><li>Association </li></ul></ul><ul><li>Associations can be further classified as </li></ul><ul><ul><li>Aggregation </li></ul></ul><ul><ul><li>Composition </li></ul></ul>
    17. 17. Subtype2 Supertype Subtype1 OO Relationships: Generalization - Generalization expresses a parent/child relationship among related classes. - Used for abstracting details in several layers Regular Customer Loyalty Customer Customer Example: Regular Customer Loyalty Customer Customer or:
    18. 18. OO Relationships: Association <ul><li>Represent relationship between instances of classes </li></ul><ul><ul><li>Student enrolls in a course </li></ul></ul><ul><ul><li>Courses have students </li></ul></ul><ul><ul><li>Courses have exams </li></ul></ul><ul><ul><li>Etc. </li></ul></ul><ul><li>Association has two ends </li></ul><ul><ul><li>Role names (e.g. enrolls) </li></ul></ul><ul><ul><li>Multiplicity (e.g. One course can have many students) </li></ul></ul><ul><ul><li>Navigability (unidirectional, bidirectional) </li></ul></ul>
    19. 19. Association: Multiplicity and Roles University Person 1 0..1 * * Multiplicity Symbol Meaning 1 One and only one 0..1 Zero or one M..N From M to N (natural language) * From zero to any positive integer 0..* From zero to any positive integer 1..* From one to any positive integer teacher employer Role Role “ A given university groups many people; some act as students, others as teachers. A given student belongs to a single university; a given teacher may or may not be working for the university at a particular time.” student
    20. 20. OO Relationships: Composition Class W Class P 1 Class P 2 Composition: expresses a relationship among instances of related classes. It is a specific kind of Whole-Part relationship. It expresses a relationship where an instance of the Whole-class has the responsibility to create and initialize instances of each Part-class. It may also be used to express a relationship where instances of the Part-classes have privileged access or visibility to certain attributes and/or behaviors defined by the Whole-class. Composition should also be used to express relationship where instances of the Whole-class have exclusive access to and control of instances of the Part-classes . Composition should be used to express a relationship where the behavior of Part instances is undefined without being related to an instance of the Whole. And, conversely, the behavior of the Whole is ill-defined or incomplete if one or more of the Part instances are undefined. Whole Class Part Classes Example [From Dr.David A. Workman] Automobile Engine Transmission
    21. 21. OO Relationships: Aggregation Class C Class E 1 Class E 2 AGGREGATION Aggregation: expresses a relationship among instances of related classes. It is a specific kind of Container-Containee relationship. It expresses a relationship where an instance of the Container-class has the responsibility to hold and maintain instances of each Containee-class that have been created outside the auspices of the Container-class. Aggregation should be used to express a more informal relationship than composition expresses. That is, it is an appropriate relationship where the Container and its Containees can be manipulated independently. Aggregation is appropriate when Container and Containees have no special access privileges to each other. Container Class Containee Classes Bag Apples Milk Example [From Dr.David A. Workman]
    22. 22. Aggregation vs. Composition <ul><ul><li>Composition is really a strong form of aggregation </li></ul></ul><ul><ul><ul><li>components have only one owner </li></ul></ul></ul><ul><ul><ul><li>components cannot exist independent of their owner </li></ul></ul></ul><ul><ul><ul><li>components live or die with their owner </li></ul></ul></ul><ul><ul><ul><li>e.g. Each car has an engine that can not be shared with other cars. </li></ul></ul></ul><ul><ul><li>Aggregations may form &quot;part of&quot; the aggregate, but may not be essential to it. They may also exist independent of the aggregate. </li></ul></ul><ul><ul><li>e.g. Apples may exist independent of the bag. </li></ul></ul>
    23. 23. Sequence Diagram:Object interaction Self-Call : A message that an Object sends to itself. Condition: indicates when a message is sent. The message is sent only if the condition is true. Iteration Condition A B Synchronous Asynchronous Transmission delayed Self-Call [condition] remove() *[for each] remove()
    24. 24. Sequence Diagrams – Object Life Spans <ul><li>Creation </li></ul><ul><ul><li>Create message </li></ul></ul><ul><ul><li>Object life starts at that point </li></ul></ul><ul><li>Activation </li></ul><ul><ul><li>Symbolized by rectangular stripes </li></ul></ul><ul><ul><li>Place on the lifeline where object is activated. </li></ul></ul><ul><ul><li>Rectangle also denotes when object is deactivated. </li></ul></ul><ul><li>Deletion </li></ul><ul><ul><li>Placing an ‘X’ on lifeline </li></ul></ul><ul><ul><li>Object’s life ends at that point </li></ul></ul>Activation bar A B Create X Deletion Return Lifeline
    25. 25. Sequence Diagram <ul><li>Sequence diagrams demonstrate the behavior of objects in a use case by describing the objects and the messages they pass. </li></ul><ul><li>The horizontal dimension shows the objects participating in the interaction. </li></ul><ul><li>The vertical arrangement of messages indicates their order. </li></ul><ul><li>The labels may contain the seq. # to indicate concurrency. </li></ul>Message
    26. 26. Interaction Diagrams: Collaboration diagrams User Catalog Reservations start 1: look up 2: title data 3 : [not available] reserve title 4 : title returned 5 : hold title 6 : borrow title 6: remove reservation 5: title available <ul><li>Shows the relationship between objects and the order of messages passed between them.  </li></ul><ul><li>between them. </li></ul><ul><li>The objects are listed as rectangles and arrows indicate the messages being passed </li></ul><ul><li>The numbers next to the messages are called sequence numbers. They show the sequence </li></ul><ul><li>of the messages as they are passed between the objects.  </li></ul><ul><li>convey the same information as sequence diagrams, but focus on object roles instead of the </li></ul><ul><li>time sequence . </li></ul>
    27. 27. State Diagrams State Diagrams show the sequences of states an object goes through during its life cycle in response to stimuli, together with its responses and actions; an abstraction of all possible behaviors. Unpaid Start End Paid Invoice created paying Invoice destroying
    28. 28. <ul><li>Sample </li></ul><ul><li>Implementation of UML </li></ul>
    29. 29. Hotel Reservation [ USE CASE] <ul><li>(1) Identify the actors . </li></ul><ul><li>(2) Identify the responsibilities of each role . </li></ul><ul><li>(3) Identify the use cases by considering what the system can offer . </li></ul>
    30. 30. Hotel Reservation [ USE CASE] <ul><li>Identify the actors . </li></ul><ul><ul><ul><ul><li>staff </li></ul></ul></ul></ul><ul><ul><ul><ul><li>customer </li></ul></ul></ul></ul><ul><ul><ul><ul><li>guest </li></ul></ul></ul></ul><ul><ul><ul><ul><li>management </li></ul></ul></ul></ul><ul><ul><ul><ul><li>front desk </li></ul></ul></ul></ul><ul><ul><ul><ul><li>laundry service </li></ul></ul></ul></ul><ul><ul><ul><ul><li>room service </li></ul></ul></ul></ul>
    31. 31. Hotel Reservation [ USE CASE] <ul><li>(2) Identify the responsibilities of each role . </li></ul><ul><li>Staff includes management, front desk, laundry service, room service </li></ul><ul><li>Each actor is considered individually. </li></ul><ul><li>Dividing the responsibilities based on the description gives the following breakdown: </li></ul>
    32. 32. Hotel Reservation [ USE CASE] <ul><li>i) front desk </li></ul><ul><ul><ul><ul><li>accept reservation </li></ul></ul></ul></ul><ul><ul><ul><ul><li>cancel reservation </li></ul></ul></ul></ul><ul><ul><ul><ul><li>assign rooms </li></ul></ul></ul></ul><ul><ul><ul><ul><li>check in guests </li></ul></ul></ul></ul><ul><ul><ul><ul><li>check out guests </li></ul></ul></ul></ul><ul><ul><ul><ul><li>receive payment </li></ul></ul></ul></ul>
    33. 33. Hotel Reservation [ USE CASE] <ul><li>ii) room service </li></ul><ul><ul><ul><ul><li>provide room service </li></ul></ul></ul></ul><ul><ul><ul><ul><li>laundry service </li></ul></ul></ul></ul><ul><ul><ul><ul><li>provide laundry service </li></ul></ul></ul></ul><ul><li>iii) customer </li></ul><ul><ul><ul><ul><li>make reservation </li></ul></ul></ul></ul><ul><ul><ul><ul><li>cancel reservation </li></ul></ul></ul></ul>
    34. 34. Hotel Reservation [ USE CASE] <ul><li>iv) guest </li></ul><ul><ul><li>check in </li></ul></ul><ul><ul><li>check out </li></ul></ul><ul><li>v) management </li></ul><ul><ul><li>need for increasing rooms based on non availability </li></ul></ul><ul><ul><li>occupancy rate </li></ul></ul><ul><ul><li>revenue from services </li></ul></ul><ul><ul><li>reservation pattern based on holidays and conventions </li></ul></ul><ul><ul><li>corporate customer reservations </li></ul></ul>
    35. 35. Hotel Reservation [ USE CASE] <ul><li>(3) Identify the use cases by considering what the system can offer . </li></ul><ul><li>A set of use cases can be derived by grouping the related actions together </li></ul><ul><ul><ul><li>accept reservation  AcceptReservation </li></ul></ul></ul><ul><ul><ul><li>cancel reservation  CancelReservation </li></ul></ul></ul><ul><ul><ul><li>assign rooms  AssignRooms </li></ul></ul></ul><ul><ul><ul><li>check in guests  CheckInGuests </li></ul></ul></ul><ul><ul><ul><li>check out guests  CheckOutGuests </li></ul></ul></ul><ul><ul><ul><li>receive payment  ReceivePayment </li></ul></ul></ul><ul><ul><ul><li>provide room service  ProvideRoomService </li></ul></ul></ul><ul><ul><ul><li>provide laundry service  ProvideLaundryService </li></ul></ul></ul>
    36. 36. Hotel Reservation [ USE CASE] <ul><li>Consider any other possible situations. </li></ul><ul><ul><li>You can also consider different situations representing the use case . </li></ul></ul><ul><li>Example </li></ul><ul><ul><li>When a person walks into the hotel without any reservation and wants to stay </li></ul></ul><ul><ul><li>Notice that the current use cases cannot handle this situation. </li></ul></ul><ul><ul><li>We discover the need to separate two possible situations where a guest may use our hotel. </li></ul></ul><ul><li>i) Walk in </li></ul><ul><li>ii) Previous reservation made </li></ul><ul><li>i) Walk in </li></ul><ul><ul><ul><li>The walk in use case represents the situation when no previous reservations were made. </li></ul></ul></ul><ul><ul><ul><li>The customer walks into the hotel and wants to stay </li></ul></ul></ul><ul><ul><ul><li>A new class may be created to represent this use case. This use case comprises a combination of the following existing use cases: </li></ul></ul></ul><ul><ul><ul><li>a) accept reservation </li></ul></ul></ul><ul><ul><ul><li>b) assign rooms </li></ul></ul></ul><ul><ul><ul><li>c) check in guests </li></ul></ul></ul>
    37. 37. Hotel Reservation [ USE CASE]
    38. 38. Hotel Reservation [ Analysis Class Diagram ] <ul><li>(1) Identify the nouns and model the concepts as classes and adjectives as attributes. </li></ul><ul><li>(2) Identify the possible attributes by looking at how to describe each concept. </li></ul><ul><li>(3) Test the 3 relationships between the classes, has a or part of, uses or depends on, kind of or is a . </li></ul><ul><li>(4) Consider the range, default and limitations of each attribute . </li></ul>
    39. 39. <ul><li>(1) Identify the nouns and model the concepts as classes and adjectives as attributes. </li></ul><ul><li>(2) Identify the possible attributes by looking at how to describe each concept. </li></ul><ul><li>Guidelines in abstracting the possible classes and attributes </li></ul><ul><li>You may also include the adjectives as adjectives represent descriptions. </li></ul><ul><li>Adjectives become the attributes. </li></ul><ul><li>When absolute values are mentioned, it represents an attribute. </li></ul>Hotel Reservation [ Analysis Class Diagram ]
    40. 40. Hotel Reservation [ Analysis Class Diagram ] <ul><li>Example </li></ul><ul><li>$250 for a twin room </li></ul><ul><li>Descriptions attached to the nouns indicate possible specializations . </li></ul><ul><li>Example </li></ul><ul><li>Single room, Twin room, Suite </li></ul><ul><li>Room can be thought of as the general class and the single and twin as specialized classes . </li></ul><ul><li>If there are no additional attributes or operations in the specialized classes, it is possible to replace the specialized classes by an attribute. </li></ul><ul><li>In this example the suite is described by a name. A set of specialized classes is used. </li></ul><ul><li>To represent the type of room </li></ul><ul><li>This indicates that an attribute has to be defined in a room class to hold the value. </li></ul>
    41. 41. Hotel Reservation [ Analysis Class Diagram ] <ul><li>i) Abstracting the nouns from the description gives the following : </li></ul><ul><li>hotel, branch, reservation, room, room no, customer, Customer ’ s name </li></ul><ul><li>Contact address, Country, Sex, Type of accommodations, and number of rooms required </li></ul><ul><li>Names of the people and the type of room they need </li></ul><ul><li>Period of stay, Expected check in date, reservation identity, Block bookings, agencies, payment, Credit card, Credit card type, number and issuing company </li></ul><ul><li>Traveler ’ s checks, Check No., issuing company, Direct corporate billing corporate account number, Cash, room rate, $10 for breakfast, $10 for lunch, $10 for dinner, Reservation, Name of the guest ’ s expected, Type of payment, Shirt $5, Suits $12, Dress $8, Trousers $9, Others $6, suite, single, twin, Single $150, Twin $250, Suite $550 </li></ul>
    42. 42. Hotel Reservation [ Analysis Class Diagram ] <ul><li>ii) Organizing the nouns and adjectives gives the following : </li></ul><ul><ul><ul><li>System </li></ul></ul></ul><ul><ul><ul><li>Hotel represents the system. </li></ul></ul></ul><ul><li>Possible classes </li></ul><ul><ul><ul><li>The following gives the potential classes and the possible attributes from the list of nouns and adjectives. </li></ul></ul></ul>
    43. 43. Hotel Reservation [ Analysis Class Diagram ] <ul><li>Reservation </li></ul><ul><ul><ul><li>Reservation identity </li></ul></ul></ul><ul><ul><ul><li>No. of single rooms required </li></ul></ul></ul><ul><ul><ul><li>No. of twin rooms required </li></ul></ul></ul><ul><ul><ul><li>No. of suite rooms required </li></ul></ul></ul><ul><ul><ul><li>breakfast </li></ul></ul></ul><ul><ul><ul><li>lunch </li></ul></ul></ul><ul><ul><ul><li>dinner </li></ul></ul></ul><ul><li>Meal charge </li></ul><ul><ul><ul><li>type of meal </li></ul></ul></ul><ul><ul><ul><li>cost </li></ul></ul></ul>
    44. 44. Hotel Reservation [ Analysis Class Diagram ] <ul><li>Guest </li></ul><ul><ul><li>name </li></ul></ul><ul><li>Single room </li></ul><ul><ul><li>room n o. </li></ul></ul><ul><ul><li>rate </li></ul></ul><ul><li>Twin room </li></ul><ul><ul><li>room no. </li></ul></ul><ul><ul><li>rate </li></ul></ul><ul><li>Suite </li></ul><ul><ul><li>room no. </li></ul></ul><ul><ul><li>rate </li></ul></ul><ul><ul><li>suite name </li></ul></ul><ul><li>Customer </li></ul><ul><ul><li>name, contact address, country, sex, </li></ul></ul><ul><li>Cash payment </li></ul><ul><ul><li>amount </li></ul></ul><ul><li>Credit card payment </li></ul><ul><ul><li>amount, Credit card type, number and issuing company </li></ul></ul><ul><li>Traveler ’ s check payment </li></ul><ul><ul><li>amount, Check No., issuing company </li></ul></ul>
    45. 45. Hotel Reservation [ Analysis Class Diagram ] <ul><li>Direct corporate billing payment </li></ul><ul><ul><li>amount, corporate account number </li></ul></ul><ul><li>Laundry charge </li></ul><ul><ul><li>type of clothing </li></ul></ul><ul><ul><li>cost per piece </li></ul></ul><ul><li>Laundry use </li></ul><ul><ul><li>date of use </li></ul></ul><ul><ul><li>No. of pieces </li></ul></ul><ul><ul><li>type of clothing </li></ul></ul><ul><li>Room service charge </li></ul><ul><ul><li>type of service </li></ul></ul><ul><ul><li>cost </li></ul></ul>
    46. 46. Hotel Reservation [ Analysis Class Diagram ] <ul><li>(3) Test the 3 relationships between the classes, has a or part of, uses or depends on, kind of or is a . </li></ul><ul><li>Generalization specialization </li></ul><ul><ul><li>Traveler ’ s check, Direct corporate billing, cash and credit card are types of payment. </li></ul></ul><ul><ul><li>The general class is abstracted. </li></ul></ul><ul><li>payment </li></ul><ul><ul><li>amount </li></ul></ul>
    47. 47. Hotel Reservation [ Analysis Class Diagram ] <ul><li>Aggregation </li></ul><ul><ul><li>laundry use is a set of objects . </li></ul></ul><ul><ul><li>laundry usage has many laundry items. </li></ul></ul><ul><ul><li>An aggregation can be used to represent laundry. </li></ul></ul><ul><li>Association </li></ul><ul><ul><li>The following shows the type: </li></ul></ul><ul><ul><li>Customer makes reservation. </li></ul></ul><ul><ul><li>rooms are assigned to the reservation. </li></ul></ul><ul><ul><li>guests belonging to the reservation </li></ul></ul><ul><ul><li>reservation requires meals </li></ul></ul><ul><ul><li>Reservation has a payment attached. </li></ul></ul><ul><ul><li>Payment comprises meals, room service, laundry service and room charge </li></ul></ul><ul><ul><li>When rooms are assigned to the reservation, an assignment class representing the association is created. </li></ul></ul><ul><ul><li>The reservation object is associated with room objects through the room assignment object. Each room object is related through one room assignment object to the reservation. </li></ul></ul><ul><ul><li>This means one reservation may have one or more rooms. </li></ul></ul><ul><ul><li>One customer can make one or more reservations. </li></ul></ul><ul><ul><li>One reservation may have one or more guests. </li></ul></ul><ul><ul><li>Each reservation can have the meal options. </li></ul></ul>
    48. 48. Hotel Reservation [ Analysis Class Diagram ] <ul><li>(4) Consider the range, default and limitations of each attribute . </li></ul><ul><ul><ul><li>laundry charge </li></ul></ul></ul><ul><ul><ul><li>type of clothing: Shirt, Suits, Dress, Trousers, Others </li></ul></ul></ul><ul><ul><ul><li>cost per piece: 5, 12, 8, 9, 6 </li></ul></ul></ul><ul><ul><ul><li>single room </li></ul></ul></ul><ul><ul><ul><li>room No.: 100 to 149, 200 to 249 </li></ul></ul></ul><ul><ul><ul><li>rate 150 </li></ul></ul></ul><ul><ul><ul><li>twin room </li></ul></ul></ul><ul><ul><ul><li>room No., 150 to 199, 250 to 299 </li></ul></ul></ul><ul><ul><ul><li>rate 250 </li></ul></ul></ul><ul><ul><ul><li>suite </li></ul></ul></ul><ul><ul><ul><li>room No., 300, 301, 302 </li></ul></ul></ul><ul><ul><ul><li>rate 550 </li></ul></ul></ul><ul><ul><ul><li>suite name Royal suite, Presidential suite, Honeymoon suite </li></ul></ul></ul><ul><ul><ul><li>meal charge </li></ul></ul></ul><ul><ul><ul><li>type of meal breakfast, lunch, dinner </li></ul></ul></ul><ul><ul><ul><li>cost: $10 </li></ul></ul></ul>
    49. 49.
    50. 50. [Statecharts] <ul><li>(1) Consider the state changes induced by the use case. </li></ul><ul><ul><li>Now that we have a set of classes, we can consider how the objects representing each class is affected by the use cases. </li></ul></ul><ul><ul><li>The following shows the possible state changes and the classes affected: </li></ul></ul><ul><li>accept reservation use case </li></ul><ul><ul><li>The reservation object is created and the state is unpaid and room Unassigned. </li></ul></ul><ul><ul><li>It can also be a Block reservation if the reservation is made by the agency. </li></ul></ul><ul><ul><li>Or a Not Block reservation </li></ul></ul><ul><li>assign rooms </li></ul><ul><ul><li>The reservation object goes from room Unassigned to rooms Not checked in state but is still in the unpaid state. </li></ul></ul><ul><ul><li>The association object (Room Assignment) is created with the state assigned Not check in. </li></ul></ul><ul><ul><li>To represent the relationship between the reservation and the room </li></ul></ul><ul><li>check in guests </li></ul><ul><ul><li>The reservation object goes from rooms Not checked in state to Partial check Out when the first guest checks in. </li></ul></ul><ul><ul><li>The Room Assignment object goes from the assigned Not check in to Assigned Check in. </li></ul></ul><ul><ul><li>A change back to the same state is also allowed in this use case. </li></ul></ul><ul><ul><li>The reservation object goes from Partial check Out state to Partial check Out when the other guests checks in. </li></ul></ul><ul><ul><li>If the last guest comes in then it becomes All Guest Check in. </li></ul></ul>
    51. 51. <ul><li>cancel reservation </li></ul><ul><ul><li>The reservation object goes from Rooms Not checked in if rooms are assigned or Room Unassigned to Cancelled if the whole reservation is cancelled. </li></ul></ul><ul><ul><li>A change back to the same state is also allowed in this use case. </li></ul></ul><ul><ul><li>This represents the situation where only some guests are cancelled. </li></ul></ul><ul><ul><li>The reservation object goes from Rooms Not checked in to Rooms Not checked in. </li></ul></ul><ul><li>check out guests </li></ul><ul><ul><li>The reservation object goes from Unpaid to paid if the type of payment is cash, check or credit card. </li></ul></ul><ul><ul><li>The payment takes place in the check out. </li></ul></ul><ul><ul><li>If the type of payment is corporate, a different payment use case takes place after the checkout representing the payment received from the corporate. </li></ul></ul><ul><ul><li>The reservation also goes from the Partial check in or all guest checked in to the partial checked out if the there are still guests remaining in the hotel for the reservation. </li></ul></ul><ul><ul><li>A change back to the same state is also allowed in this use case. </li></ul></ul><ul><ul><li>The reservation also goes from partial checked out to partial checked out when the guests checked out. </li></ul></ul><ul><ul><li>When the last guest checked out, the reservation goes to the All guest checked out. </li></ul></ul><ul><ul><li>The Room Assignment object goes from the assigned Not check in to Assigned Checkout. </li></ul></ul><ul><li>receive payment </li></ul><ul><ul><li>This is done either the checkout or a different use case depending upon the </li></ul></ul><ul><ul><li>Type of payment. </li></ul></ul><ul><ul><li>If the type of payment is corporate the payment is a separate use case as the </li></ul></ul><ul><ul><li>Hotel have to wait for notification of payment from the company. </li></ul></ul><ul><ul><li>For the other payment types, direct payment is made when the guests checked out </li></ul></ul><ul><li>provide room service </li></ul><ul><ul><li>The room service usage object is created. </li></ul></ul><ul><li>provide laundry service </li></ul><ul><ul><li>The laundry service usage object is created. </li></ul></ul>[Statecharts]
    52. 52.
    53. 53.
    54. 54. Activity Diagram <ul><li>The activity diagram shows the actual steps performed in the use case. It looks like a flowchart with the decisions represented by a diamond and the tasks represented by a box . </li></ul><ul><li>(1) Make Reservation </li></ul><ul><li>The following shows the related tasks and decisions made when a reservation is made. </li></ul><ul><li>- A customer specifies the type of accommodation, number required, period of stay, and expected check in date. </li></ul><ul><li>- The person at the front desk checks the availability, and if available, the following additional information is requested: </li></ul><ul><li>Name and Contact telephone of the person making the reservation </li></ul><ul><li>Name of the guest ’ s expected </li></ul><ul><li>Type of room for them </li></ul><ul><li>- The person at the front desk also asks if any combination of the meals is required, i.e. breakfast, lunch or dinner. </li></ul><ul><li>- The person at the front desk then informs the customer of the reservation identity. </li></ul>
    55. 55.
    56. 56.
    57. 57.
    58. 58.
    59. 59.
    60. 60.
    61. 61.
    62. 62.
    63. 63.
    64. 64.
    65. 65.
    66. 66. Continuation….

    ×