Top Banner
MULTIPLEX’S TICKET BOOKING SYSTEM USE CASE DIAGRAM CLASS DIAGRAM Presented By: Abhishek Basu Sec-A,Roll-2 CSE 6 th Semester
23

Multiplex Ticket Booking System1

Apr 08, 2015

Download

Documents

Abhishek Basu
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Multiplex Ticket Booking System1

MULTIPLEX’S TICKET BOOKING SYSTEM

USE CASE DIAGRAM CLASS DIAGRAM

Presented By:Abhishek Basu

Sec-A,Roll-2CSE 6th Semester

Page 2: Multiplex Ticket Booking System1

USE CASE DIAGRAM INTRODUCTION

• A use case diagram is “a diagram that shows the relationships among actors and use cases within a system.” Use case diagrams are often used to:

• Provide an overview of all or part of the usage requirements for a system or organization in the form of an essential model or a business model

• Communicate the scope of a development project• Model your analysis of your usage requirements in the form of a system use case model• A use case model is comprised of one or more use case diagrams and any supporting

documentation such as use case specifications and actor definitions. Within most use case models the use case specifications tend to be the primary artifact with use case diagrams filling a supporting role as the “glue” that keeps your requirements model together. Use case models should be developed from the point of view of your project stakeholders and not from the (often technical) point of view of developers. There are guidelines for:

• Use Cases• Actors• Relationships• System Boundary Boxes

Page 3: Multiplex Ticket Booking System1

USE CASES

1.Use Cases• A use case describes a sequence of actions that provide a

measurable value to an actor.  A use case is drawn as a horizontal ellipse on a UML use case diagram, as you see in Figure 1.

• Use Case Names Begin With a Strong Verb• Name Use Cases Using Domain Terminology• Place Your Primary Use Cases In The Top-Left Corner Of

The Diagram• Imply Timing Considerations By Stacking Use Cases.  As

you see in Figure 1, the use cases that typically occur first are shown above those that appear later.

Page 4: Multiplex Ticket Booking System1

Fig1:Implying timing considerations between use cases

Page 5: Multiplex Ticket Booking System1

ACTORS

• 2. Actors• An actor is a person, organization, or external system that

plays a role in one or more interactions with your system (actors are typically drawn as stick figures on UML Use Case diagrams). 

1. Place Your Primary Actor(S) In The Top-Left Corner Of The Diagram2. Draw Actors To The Outside Of A Use Case Diagram3. Name Actors With Singular, Business-Relevant Nouns4. Associate Each Actor With One Or More Use Cases5. Actors Model Roles, Not Positions6. Use <<system>> to Indicate System Actors7. Actors Don’t Interact With One Another8. Introduce an Actor Called “Time” to Initiate Scheduled Events

Page 6: Multiplex Ticket Booking System1

Fig2:Online Shopping

Page 7: Multiplex Ticket Booking System1

RELATIONSHIPS

• 3. Relationships• There are several types of relationships that may appear on

a use case diagram:• An association between an actor and a use case• An association between two use cases• A generalization between two actors• A generalization between two use cases• Associations are depicted as lines connecting two modeling

elements with an optional open-headed arrowhead on one end of the line indicating the direction of the initial invocation of the relationship. Generalizations are depicted as a close-headed arrow with the arrow pointing towards the more general modeling element.

Page 8: Multiplex Ticket Booking System1

Fig3:Enrolling students In a University

Page 9: Multiplex Ticket Booking System1

Relationships Contd…..1. Indicate An Association Between An Actor And A Use Case If The Actor Appears

Within The Use Case Logic2. Avoid Arrowheads On Actor-Use Case Relationships  3. Apply <<include>> When You Know Exactly When To Invoke The Use Case4. Apply <<extend>> When A Use Case May Be Invoked Across Several Use

Case Steps  5. Introduce <<extend>> associations sparingly6. Generalize Use Cases When a Single Condition Results In Significantly New

Business Logic  7. Do Not Apply <<uses>>, <<includes>>, or <<extends>>8. Avoid More Than Two Levels Of Use Case Associations9. Place An Included Use Case To The Right Of The Invoking Use Case10. Place An Extending Use Case Below The Parent Use Case  11. Apply the “Is Like” Rule to Use Case Generalization12. Place an Inheriting Use Case Below The Base Use Case13. Apply the “Is Like” Rule to Actor Inheritance 14. Place an Inheriting Actor Below the Parent Actor

Page 10: Multiplex Ticket Booking System1

SYSTEM BOUNDARY BOXES

• 4.System Boundary Boxes• The rectangle around the use cases is called the

system boundary box and as the name suggests it indicates the scope of your system – the use cases inside the rectangle represent the functionality that you intend to implement.  

• Indicate Release Scope with a System Boundary Box.  In Figure 2 you see that three system boundary boxes are included, each of which has a label indicating which release the various use cases have been assigned to. 

• Avoid Meaningless System Boundary Boxes.

Page 11: Multiplex Ticket Booking System1

USE CASE DIAGRAM……

For MULTIPLEX TICKET BOOKING SYSTEM….

Page 12: Multiplex Ticket Booking System1

u

ENQUIRES ON AVAILABILITY

ENTERS REQUEST FOR MOVIE IN

SYSTEM

USES DATABASE FOR AVAILABILTY

INFORMS STATUS OF AVAILABILITY

BOOK TICKET

CUSTOMER TICKET SELLER

uses

PAY PRICE

Page 13: Multiplex Ticket Booking System1

CLASS DIAGRAMS INTRODUCTION

• It is a Static model type• A view of the system in terms of

classes and relationships• Classes not only describe attributes

but also behavior• Description of object types .• Attributes and behavior of a type of

objects• All objects are instances of a certain

class

Page 14: Multiplex Ticket Booking System1

REPRESENTING A CLASS IN UML

• A rectangle divided into 3 compartments:

• Name, Attributes, Operations• Let’s have a look at these three

compartments...

Page 15: Multiplex Ticket Booking System1

Continued…..• The Name compartment• Starts with an uppercase• Boldface• Most of the time a noun

Page 16: Multiplex Ticket Booking System1

Continued….• The Attributes compartment• Starts with a lowercase• Has a type (String, Integer, …)• Can have a visibility• ‣ public (+), private (-), protected (#)• Default values can be specified• Allowed values can be specified

({...})• Class scope is possible (underlined)

Page 17: Multiplex Ticket Booking System1

Continued….• The Operation

Compartment :• Contains the signature of the

operation‣ a return type‣ a name‣ zero or more parameters• Can have a visibility‣ public (+), private (-), protected (#)

Page 18: Multiplex Ticket Booking System1

RELATIONSHIPS BETWEEN CLASSES

• An association is a connection between classes• “usage”• A generalization is a relationship between a more• general and a more specific element• “inheritance”• A refinement is a relationship between two• descriptions of the same thing but at different levels

of• abstraction• A realization is a relationship between elements

where• one carries out what the other specifies

Page 19: Multiplex Ticket Booking System1

ASSOCIATIONS

• Specify structural relationships• Specifies that objects are

interconnected• Can be implemented in a lot of ways– through instance variables– through arguments of methods

Page 20: Multiplex Ticket Booking System1

ASSOCIATION RELATIONSHIP

• Drawn as line between classes• By default bidirectional but

particular direction can be indicated

• Can contain multiplicities, a range that tells us how many objects are linked

Page 21: Multiplex Ticket Booking System1

CLASS DIAGRAM……

For MULTIPLEX TICKET BOOKING SYSTEM…

Page 22: Multiplex Ticket Booking System1

Class Diagram for Buying Ticket

Page 23: Multiplex Ticket Booking System1