300 likes | 395 Vues
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
E N D
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 • Event decomposition: help identify use cases
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
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
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
Procedure for Developing an Initial List of Things • List nounsusers 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
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
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
Figure 5-15 Multiplicity 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
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