Object Oriented Design with UML Continuation I - PowerPoint PPT Presentation

1 / 24
About This Presentation
Title:

Object Oriented Design with UML Continuation I

Description:

The customer browses the catalog and adds desired items to the shopping basket. ... Customer browses through catalog and selects items to buy. Customer goes to ... – PowerPoint PPT presentation

Number of Views:18
Avg rating:3.0/5.0
Slides: 25
Provided by: khrystyna1
Category:

less

Transcript and Presenter's Notes

Title: Object Oriented Design with UML Continuation I


1
Object Oriented Design with UML (Continuation I)
ECE 668 Fundamentals of Computer
Engineering Module II Software Engineering
Andrzej Rucinski Khrystyna Pysareva Spring 2004
2
UMLs 12 Standard Diagram Types
  • Structural Diagrams
  • Class Diagram, Object Diagram, Component Diagram,
    and Deployment Diagram
  • Behavior Diagrams
  • Use Case Diagram, Sequence Diagram, Activity
    Diagram, Collaboration Diagram, and Statechart
    Diagram
  • Model Management Diagrams
  • Packages, Subsystems, and Models

3
OO system design guidelines
  • Ask what the system is supposed to do
  • Identify objects the system will need to do it

a). Identify operations to be performed b).
Identify information needed
3. Assign responsibility for the operations and
information to objects
a). Each object knows how to perform its own
operations b). Each object remembers its own
information
4
Use Case Diagram
A use case diagram is a graph of actors, a set of
use cases, possibly some interfaces, and the
relationships between these elements. The
relationships are associations between the actors
and the use cases, generalizations between the
actors, and generalizations, extends, and
includes among the use cases. The use cases may
optionally be enclosed by a rectangle that
represents the boundary of the containing system
or classifier.
A technique for describing the system
requirements from the users point of view
5
Use cases purpose
  • System requirements clarification
  • Communication with customers
  • Communication with designers
  • Communication with testers
  • System documentation

6
Definitions
  • A scenario is a sequence of steps describing an
    interaction between a user and a system
  • A use case is a set of scenarios tied together by
    a common user goal

7
Use case diagram components
  • 1. Actors is a role that user (or external
    system) plays with respect to the system
  • 2. Named use cases
  • 3. Relationships
  • Associations (actor to use case)
  • Generalizations (use case to use case actor to
    actor)
  • Extend (use case to use case)
  • Include (use case to use case)

8
Association
  • Actor and Use Case

9
Extend
  • Use Case A to Use Case B

10
Generalization
  • Use Case A to Use Case B

11
Generalization
  • Actor to Actor

12
Include
  • Use Case A to Use Case B

13
Use Case Example
  • Web-based online store
  • Buy a Product scenario
  • The customer browses the catalog and adds desired
    items to the shopping basket. When the customer
    wishes to pay, the customer describes the
    shipping and credit card information and confirms
    the sale. The system checks the authorization on
    the credit card and confirms the sale both
    immediately and with a follow-up email.
  • ltAdopted from UML distilled by Fowler and Scott
    2nd ed.gt

14
Use Case Example (Cont.)
  • Use Case Buy a Product
  • Actors Customer, System
  • Section Main
  • Customer browses through catalog and selects
    items to buy
  • Customer goes to checkout
  • Customer fills in shipping information (address
    next-day or 3-day delivery)
  • System presents full pricing information,
    including shipping
  • Customer fills in credit card information
  • System authorizes purchase
  • System confirms sale immediately
  • System sends confirming email to customer

15
Use Case Example (Cont.)
  • Alternative Courses
  • Authorization Failure
  • 6 System fails to authorize credit purchase.
    Allow customer to re-enter credit card
    information and retry
  • Regular Customer
  • 3a. System displays current shipping information,
    pricing information, and last four digits of
    credit card information
  • 3b. Customer may accept or override these
    defaults. Return to Main Course of Events at Line
    6.

16
Use Case Example (Cont.)
  • Use Case Diagram

17
Objects
  • Basic Object Related Concepts
  • Encapsulation
  • Information Hiding
  • Message Passing
  • Polymorphism
  • Classes and Instances
  • Inheritance

18
Objects
  • An Object encapsulates both functions and data,
    i.e. retains certain information, and knows how
    to perform certain operations.

Information and Operations
Encapsulation
Information Hiding
19
Message
  • One object accesses another object by sending it
    a message

message
Behavior of the object the set of messages to
which an object can respond An object can send
private messages to itself to implement publicly
accessible operations
20
Method and Signature
  • Method is an algorithm executed in response to
    receiving a message whose name matches the name
    of the method
  • Signature is the name of a method, the types of
    its parameters, and the type of the object that
    the method returns.

21
Classes, Instances, and Polymorphism
  • Objects which share the same behavior are said to
    belong to the same class. A class is a generic
    specification for an arbitrary number of similar
    objects.
  • All objects are instances of some class.
  • Polymorphism is the ability of two or more
    classes of object to respond to the same message,
    each in its own way.

22
Homework
23
Visio and UML
24
Visio and UML
Write a Comment
User Comments (0)
About PowerShow.com