Object-Oriented Analysis and Design

29
Object-Oriented Analysis and Design LECTURE 4: USE CASES AND DOMAIN CLASSES

description

Object-Oriented Analysis and Design. Lecture 4: Use cases and domain classes. Objectives. Events and Use Cases Event Table Problem Domain Classes Domain Model Class Diagram. Events and Use Cases. Use case Activity the system carries out Entry point into the modeling process - PowerPoint PPT Presentation

Transcript of Object-Oriented Analysis and Design

Object-Oriented Analysis and DesignLECTURE 4: USE CASES AND DOMAIN CLASSES

Objectives

Events and Use Cases Event Table

Problem Domain Classes Domain Model Class Diagram

Events and Use Cases

Use case Activity the system carries out Entry point into the modeling process

Event decomposition: help identify use cases

Identifying Use Cases by Focusing on Users and their Goals

Types of Events

External Events Occur outside the system

Usually caused by external agent

Temporal Events Occurs when system reaches a point (deadline) in time

External Event Checklist

External Event Examples

Temporal Event Checklist

Temporal Event Examples

Looking At Each Event and the Resulting Use Case

Enter use cases in an event table

Event table includes rows and columns Each row is a record linking an event to a use case

Columns represent key information  

Sample Entry in an Event Table

Sample Event Table

Activity Diagram

One Activity Diagram per Use Case

Problem Domain Classes

Problem domain Set of work-related “things” in system component Examples: products, orders, invoices, customers

OO approach to things in problem domain Objects that interact in the system

Identify and understand things in problem domain Key initial steps in defining requirements

Types of Things

Things can be identified with methodology

Separate the tangible from the intangible

Include information from all types of users

Ask important questions about nature of event “What actions upon things should be acknowledged and recorded by the

system?”

Example case: customer placing an order

Types of Things

Procedure for Developing an Initial List of Things

List nouns users mention when discussing system

Event table as source of potential things

Use cases, external agents, triggers, response  

Select nouns with questions concerning relevance

Further research may be needed

Attributes of Things

Specific details of things are called attributes

Analyst should identify attributes of things

Identifier (key): attribute uniquely identifying thing Examples: Social Security number, vehicle ID number, or product ID

number

Example Attributes and Values

Classes and Objects

Domain model class diagram as UML class OOA applies domain model class diagram to things

Problem domain objects have attributes Software objects encapsulate attributes and behaviors

Behavior: action that the object processes itself

Software objects communicate with messages Information system is a set of interacting objects

Objects Encapsulate Attributes and Methods

Domain Model Class Diagram Notation Class diagram key

General class symbol: rectangle with three sections Sections convey name, attributes, and behaviors Methods (behaviors) not shown in domain model class diagram Lines connecting rectangles show associations Multiplicity reflected above connecting lines

Sample Domain Model Class Diagram Showing Attributes

Figure 5-15Multiplicity of Relationships

 Associations among Things

Analyst document entity associations ( relationships) Example: “Is placed by” and “works in”

Associations apply in two directions Customer places an order An order is placed by a customer

Multiplicity: the number of associations One to one or one to many 

Sample Domain Model Class Diagram With an Association Class

Sample Design Class Diagram with Methods

Larger Domain Model Class Diagram

Next Tonight

Review any Requirements Documents that have been produced

Prep for next week’s interview with Sponsor

Next Week Sponsor Interview

6:30 – 7:30p: Degree and Certificate Auditor

7:30 – 8:30p: Baseball League Information Manager

Have Sponsor Review your Inception Phase documents

Ask Sponsor questions necessary to have detail to create Event Table, Activity Diagrams, and Domain Model Class Diagrams