Chapter 7: The ObjectOriented Approach to Requirements part 2 - PowerPoint PPT Presentation

1 / 22
About This Presentation
Title:

Chapter 7: The ObjectOriented Approach to Requirements part 2

Description:

Freshmen must register from designated computers on campus ... Describe message from external actor to system using message notation ... – PowerPoint PPT presentation

Number of Views:26
Avg rating:3.0/5.0
Slides: 23
Provided by: valu84
Category:

less

Transcript and Presenter's Notes

Title: Chapter 7: The ObjectOriented Approach to Requirements part 2


1
Chapter 7 The Object-Oriented Approach
to Requirementspart 2
2
Use Case For Enroll in Course
Other information If student does not have
prereq, must ask professor for override If
student needs override, professor performs
override and then enrolls student in class
assume entering override can be done as
standalone use case, or as part of enroll in
course Create use case scenarios and diagram
for Enroll in Course
3
Scenarios
  • Upper-class student enrolls in course
  • Main Flow
  • Students wait until system allows them access to
    enroll. Depending on year of study, the system
    determines when a student can enroll.
  • Students enter the CRNs of the section of the
    course they wish to enroll in.
  • For each CRN entered, the courses the student has
    completed are compared with the prerequisites for
    the course.
  • Next, the availability in the requested section
    is checked. If the student has the proper
    prerequisites, and space exists in the section,
    the student is enrolled.
  • The process is repeated until all CRNs are
    processed.
  • Exceptions
  • If a student who is not eligible to enroll in a
    given academic term attempts to do so, they are
    not permitted.
  • If a student attempts to enroll outside allotted
    enrollment window, they are not permitted
  • If the student does not have the prerequisites,
    they must request an override to enroll.
  • If a section is full, the student must request an
    override to enroll.

4
Scenarios
  • Freshman enrolls student in course
  • Main Flow
  • Freshmen must register from designated computers
    on campus
  • Students wait until system allows them access to
    enroll. Depending on year of study, the system
    determines when a student can enroll.
  • Students enter the CRNs of the section of the
    course they wish to enroll in.
  • For each CRN entered, the courses the student has
    completed are compared with the prerequisites for
    the course.
  • Next, the availability in the requested section
    is checked. If the student has the proper
    prerequisites, and space exists in the section,
    the student is enrolled.
  • The process is repeated until all CRNs are
    processed.
  • Exceptions
  • If a student attempts to register from a
    non-authorized computer, they are not permitted
  • If a student attempts to enroll outside allotted
    enrollment window, they are not permitted
  • If the student does not have the prerequisites,
    they must request an override to enroll.
  • If a section is full, the student must request an
    override to enroll.

5
Use Case Diagram Enroll in Course
Enroll in Course
Freshman
Upper Class Student
ltltincludesgtgt
ltltincludesgtgt
Enter Override
Check prerequisites
Professor
ltltincludesgtgt
Check section availability
6
Exercise
  • Consider the Use Case Print timetable
  • What are the scenarios you can think of?
  • Choose one scenario and develop a use case
    description (intermediate)
  • Include exception conditions
  • Draw the use case diagram (all scenarios).

7
Object Interactions
  • Interaction diagrams
  • Emphasizes the objects that interact together to
    support a use case diagram
  • Sequence diagram
  • Focuses on message details
  • Bottom-up approach

8
Sequence Diagrams
  • Shows sequence of interactions between objects
    that occurs during flow of events in a single use
    case
  • Consists of four basic symbols
  • Represents a specific set of messages and
    interactions between objects

9
Symbols of a Sequence Diagram
10
SSD Notation
  • Actor represented by a stick figure a person
    (or role) that interacts with system by entering
    input data and receiving output data
  • Object is a rectangle with name of object
    underlined shows individual object and not
    class of all similar objects ( System for SSD )
  • Lifeline or object lifeline is a vertical line
    under object or actor to show passage of time for
    object
  • Message is labeled on arrows to show messages
    sent to or received by actor or system

11
Identifying Inputs and OutputsThe System
Sequence Diagram
  • System sequence diagram (SSD) is type of UML 2.0
    interaction diagram
  • Used to model input and output messaging
    requirements for a use case or scenario
  • Shows actor interacting with system
  • Shows sequence of interactions as messages during
    flow of activities
  • System is shown as one object a black box

12
System Sequence Diagram (SSD) Notation (Figure
7-14)
13
Lifelines
  • Vertical line under object or actor shows
    passage of time
  • If dashed creation and destruction of thing is
    not important for scenario
  • Long narrow rectangles activation lifelines used
    to emphasize that an object is active only during
    part of a scenario for a sequence diagram

14
Messages
  • Requests from one actor or object to another to
    do some action
  • Invokes a particular method
  • Syntax (full)
  • true/false condition return-valuemessage-name
    parameter list
  • True/false conditon test to see if message to
    be sent
  • first_item ordernumber createOrder()
  • Return-value what is to be returned from
    invoked method
  • Previous example - ordernumber
  • Message name name of message descriptive
  • createOrder
  • Parameter list List of values passed to the
    method to be executed
  • createOrderitem (itemID, qty)

15
Partial Class Diagram for RMO
16
Sequence Diagram for Look Up Item Availability
17
Repeating Message(Figure 7-15)
18
SSD of the Web Order Scenario for the Create New
Order Use Case(Figure 7-18)
19
Developing a System Sequence Diagram
  • Begin with detailed description of use case from
    fully developed form or activity diagram
  • Identify input messages
  • Describe message from external actor to system
    using message notation
  • Identify and add any special conditions on input
    message, including iteration and true/false
    conditions
  • Identify and add output return messages

20
Identifying Object Behavior The State Machine
Diagram
  • State machine diagram is UML 2.0 diagram that
    models object states and transitions
  • Complex problem domain classes can be modeled
  • State of an object
  • A condition that occurs during its life when it
    satisfies some criterion, performs some action,
    or waits for an event
  • Each state has unique name and is a semipermanent
    condition or status
  • Transition
  • The movement of an object from one state to
    another state

21
Simple State Machine Diagram for a Printer
(Figure 7-19)
22
Relationships Among OO Models
Write a Comment
User Comments (0)
About PowerShow.com