Requirements Analysis Visual Modeling] Lab 02 Visual Modeling (from Visual Modeling with Rational...

20
Requirements Analysis Visual Modeling] Lab 02

Transcript of Requirements Analysis Visual Modeling] Lab 02 Visual Modeling (from Visual Modeling with Rational...

Page 1: Requirements Analysis Visual Modeling] Lab 02 Visual Modeling (from Visual Modeling with Rational Rose and UML) A way of thinking about problems using.

Requirements Analysis

Visual Modeling]

Lab 02

Page 2: Requirements Analysis Visual Modeling] Lab 02 Visual Modeling (from Visual Modeling with Rational Rose and UML) A way of thinking about problems using.

VisualVisual Modeling Modeling (from Visual Modeling with Rational Rose and UML)(from Visual Modeling with Rational Rose and UML)

A way of thinking about problems using models A way of thinking about problems using models organized around organized around real-worldreal-world ideas ideas We can We can visualizevisualize them in our head them in our head

To promote a better understanding of To promote a better understanding of requirements, cleaner designs, and more requirements, cleaner designs, and more maintainable systemsmaintainable systems

We build models because we cannot comprehend We build models because we cannot comprehend such systems in their entiretysuch systems in their entirety Focus on the big picture of how a project’s components Focus on the big picture of how a project’s components

interactinteract Without getting bogged down in the specific details of each Without getting bogged down in the specific details of each

componentcomponent

Page 3: Requirements Analysis Visual Modeling] Lab 02 Visual Modeling (from Visual Modeling with Rational Rose and UML) A way of thinking about problems using.

The Triangle for SuccessThe Triangle for Success

Notation:

Unified Modeling Language (UML)

Tool:

Rational Rose

Process

Rational Objectory Process

Page 4: Requirements Analysis Visual Modeling] Lab 02 Visual Modeling (from Visual Modeling with Rational Rose and UML) A way of thinking about problems using.

INTRODUCTION INTRODUCTION TOTO

UMLUML

Page 5: Requirements Analysis Visual Modeling] Lab 02 Visual Modeling (from Visual Modeling with Rational Rose and UML) A way of thinking about problems using.

The Value of the UML

• Is an open standard

• Supports the entire software development lifecycle

• Supports diverse applications areas

• Is based on experience and needs of the user community

• Supported by many tools

Page 6: Requirements Analysis Visual Modeling] Lab 02 Visual Modeling (from Visual Modeling with Rational Rose and UML) A way of thinking about problems using.

What is the UML?• The UML is a language for visualizing, specifying,

constructing, and documenting the artifacts of a software-intensive system

• Process and implementation independent– It can be used with a large number of processes,

throughout the development life cycle, and across OO implementation technologies

• The UML combines– Data Modeling concepts (Entity Relationship Diagrams)

– Business Modeling (work flow)

– Object Modeling

– Component Modeling

• The standard for OO systems

Page 7: Requirements Analysis Visual Modeling] Lab 02 Visual Modeling (from Visual Modeling with Rational Rose and UML) A way of thinking about problems using.

The UML Usages

• Define the boundaries of a system & its major functions– use cases and actors

• Illustrate use cases– interaction diagrams

• Define the static structure of a system – class diagrams

• Model the behavior of objects– state transition diagrams

• Document the physical implementation architecture– component & deployment diagrams

• Provide for growth– stereotypes

Page 8: Requirements Analysis Visual Modeling] Lab 02 Visual Modeling (from Visual Modeling with Rational Rose and UML) A way of thinking about problems using.

DiagramsThe foundation of UML

• Use Case Diagrams– Requirements

• Activity Diagrams– Generally what, not who - good to detect parallelism

• Interaction Diagrams– Sequence Diagrams (timeline)

– Collaboration Diagrams (object centered)

• Static Structure Diagrams – Objects/Classes/Packages

• State Chart Diagrams – States of objects with interesting lifecycles

• Implementation Diagrams– Component Diagrams

– Deployment Diagrams

Page 9: Requirements Analysis Visual Modeling] Lab 02 Visual Modeling (from Visual Modeling with Rational Rose and UML) A way of thinking about problems using.

Use case Use case ModelModel

Page 10: Requirements Analysis Visual Modeling] Lab 02 Visual Modeling (from Visual Modeling with Rational Rose and UML) A way of thinking about problems using.

External System Behavior: External System Behavior: Use Case ModelUse Case Model

Complete course of events in the system, Complete course of events in the system, from the user’sfrom the user’s perspectiveperspective

Use Cases Model: IllustratesUse Cases Model: Illustrates (use cases) the system’s intended functions(use cases) the system’s intended functions (actors) surroundings – external to the system(actors) surroundings – external to the system (use case diagrams) relationships between use (use case diagrams) relationships between use

cases and actorscases and actors Use Case Model is an important Use Case Model is an important

communication vehiclecommunication vehicle between between customerscustomers (they can understand it!) and (they can understand it!) and developersdevelopers

The collection of all use cases is everything that can be done to/with the system

Page 11: Requirements Analysis Visual Modeling] Lab 02 Visual Modeling (from Visual Modeling with Rational Rose and UML) A way of thinking about problems using.

ActorsActors

Are NOT part of the system – they Are NOT part of the system – they represent anyone or anything that represent anyone or anything that must interact with the systemmust interact with the system Only input information to the systemOnly input information to the system Only receive information from the Only receive information from the

systemsystem Both input to and receive information Both input to and receive information

from the systemfrom the system Represented in UML as a stickman Represented in UML as a stickman

Page 12: Requirements Analysis Visual Modeling] Lab 02 Visual Modeling (from Visual Modeling with Rational Rose and UML) A way of thinking about problems using.

Questions to Discover Questions to Discover Actors?Actors?

Who is interested in a certain requirement?Who is interested in a certain requirement? Where in the organization is the system used?Where in the organization is the system used? Who will benefit from the use of the system?Who will benefit from the use of the system? Who will supply the system with this information, Who will supply the system with this information,

use this information, and remove this use this information, and remove this information?information?

Who will support and maintain the system?Who will support and maintain the system? Does the system use an external resource?Does the system use an external resource? Does one person play several different roles?Does one person play several different roles? Does several people play the same role?Does several people play the same role? Does the system interact with the legacy system?Does the system interact with the legacy system?

Page 13: Requirements Analysis Visual Modeling] Lab 02 Visual Modeling (from Visual Modeling with Rational Rose and UML) A way of thinking about problems using.

A Case Study: A Case Study: Eastern Eastern State University (ESU) State University (ESU) Registration Problem: Registration Problem:

BackgroundBackground After professors decide which courses they will teach, After professors decide which courses they will teach, the Registrar enters in info in the computerthe Registrar enters in info in the computer

A course catalog is printed and distributed to studentsA course catalog is printed and distributed to students Students fill out form with their choices – usually 4 Students fill out form with their choices – usually 4

coursescourses Registrar enters this info into computerRegistrar enters this info into computer A batch job is run overnight to assign students to coursesA batch job is run overnight to assign students to courses In cases of conflict where the students cannot take the In cases of conflict where the students cannot take the

classes they had selected, the registrar contacts the classes they had selected, the registrar contacts the students directly to obtain additional choices.students directly to obtain additional choices.

Once all students have successfully assigned to courses, Once all students have successfully assigned to courses, a hardcopy of the schedule is sent to the student.a hardcopy of the schedule is sent to the student.

Professors obtain student rosters for their classes.Professors obtain student rosters for their classes.

Page 14: Requirements Analysis Visual Modeling] Lab 02 Visual Modeling (from Visual Modeling with Rational Rose and UML) A way of thinking about problems using.

Eastern State University (ESU) Eastern State University (ESU) Registration Problem: Registration Problem:

Problem StatementProblem Statement Professors indicate which courses they will Professors indicate which courses they will

teach on-line.teach on-line. A course catalog is printedA course catalog is printed Allow students to select on-line four courses Allow students to select on-line four courses

(and two additional choices) for upcoming (and two additional choices) for upcoming semester.semester.

No course may have more than 10 students or No course may have more than 10 students or less than 3 students.less than 3 students.

When the registration is completed, the system When the registration is completed, the system sends information to the billing system.sends information to the billing system.

Professors can obtain course rosters on-line.Professors can obtain course rosters on-line. Students can add or drop classes on-line.Students can add or drop classes on-line.

Page 15: Requirements Analysis Visual Modeling] Lab 02 Visual Modeling (from Visual Modeling with Rational Rose and UML) A way of thinking about problems using.

Who are the Actors?Who are the Actors?

StudentsStudentsProfessorsProfessorsRegistrarRegistrarBilling SystemBilling System

Page 16: Requirements Analysis Visual Modeling] Lab 02 Visual Modeling (from Visual Modeling with Rational Rose and UML) A way of thinking about problems using.

Use CaseUse Case A sequence of transactions performed by a system that A sequence of transactions performed by a system that

yields a measurable result of values for a particular actoryields a measurable result of values for a particular actor What are the tasks of each actor?What are the tasks of each actor? Will any actor create, store, change, remove or read information in Will any actor create, store, change, remove or read information in

the system?the system? What use cases will create, store, change, remove or read this What use cases will create, store, change, remove or read this

information?information? Will any actor need to inform the system about sudden, external Will any actor need to inform the system about sudden, external

changes?changes? Does any actor need to be informed about certain occurrences in Does any actor need to be informed about certain occurrences in

the system?the system? What use cases will support and maintain the system?What use cases will support and maintain the system? Can all functional requirements be preformed by the use cases?Can all functional requirements be preformed by the use cases?

A use case typically represents a major piece of A use case typically represents a major piece of functionality that is complete from beginning to end. A functionality that is complete from beginning to end. A use case must deliver something of value to an actor. use case must deliver something of value to an actor.

Page 17: Requirements Analysis Visual Modeling] Lab 02 Visual Modeling (from Visual Modeling with Rational Rose and UML) A way of thinking about problems using.

What are the Main Use What are the Main Use CasesCases

Register for coursesRegister for courses Select Courses to TeachSelect Courses to Teach Request course rosterRequest course roster Maintain course informationMaintain course information Maintain professor informationMaintain professor information Maintain student informationMaintain student information Create course catalogCreate course catalog

Page 18: Requirements Analysis Visual Modeling] Lab 02 Visual Modeling (from Visual Modeling with Rational Rose and UML) A way of thinking about problems using.

Use Case RelationshipsUse Case Relationships

Between Actor and Use CaseBetween Actor and Use Case Association / CommunicationAssociation / Communication Arrow can be in either or both Arrow can be in either or both

directionsdirections Arrow indicates who initiates Arrow indicates who initiates

communicationcommunication

Page 19: Requirements Analysis Visual Modeling] Lab 02 Visual Modeling (from Visual Modeling with Rational Rose and UML) A way of thinking about problems using.

Between Use Cases (Generalization): Between Use Cases (Generalization): Uses Uses

Where multiple use cases shareWhere multiple use cases sharepieces of same functionalitypieces of same functionality

ExtendsExtends Optional behaviorOptional behavior Behavior only run under certainBehavior only run under certain

conditions (such as alarm)conditions (such as alarm) Several different flows run base onSeveral different flows run base on

user selectionuser selection

Use Case RelationshipsUse Case Relationships

Page 20: Requirements Analysis Visual Modeling] Lab 02 Visual Modeling (from Visual Modeling with Rational Rose and UML) A way of thinking about problems using.

Main Use Case DiagramMain Use Case Diagram