Department of Computer Engineering
1 Sharif University of Technology
Object-Oriented Design
Lecture 6: Finding Analysis Classes
Object-Oriented Design Lecture 6: Finding Analysis Classes Sharif - - PowerPoint PPT Presentation
Object-Oriented Design Lecture 6: Finding Analysis Classes Sharif University of Technology 1 Department of Computer Engineering Analysis Workflow: Analyze a Use Case The analysis workflow consists of the following activities:
Department of Computer Engineering
1 Sharif University of Technology
Lecture 6: Finding Analysis Classes
Sharif University of Technology 2
Sharif University of Technology 3
domain.
intent.
Sharif University of Technology 4
tend to be shallow.
Sharif University of Technology 5
Sharif University of Technology 6
7
1.
Formulate a few scenarios with help from the end user and/or application domain expert.
2.
Extract the use cases from the scenarios, with the help of application domain expert.
3.
Analyse the flow of events, for example with Abbot's textual
4.
Generate the class diagrams, which includes the following steps, as before:
are found!)
attributes.
8
Sharif University of Technology 9
The customer enters a store with the intention of buying a toy
Help must be available within less than one minute. The store owner gives advice to the customer. The advice
The customer selects a dangerous toy which is kind of
The store owner recommends a more yellow doll.
10
Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 11
The customer enters the store
Customer ? enter() toy daughter suitable *
store enter() daughter age toy buy() videogame boardgame
toy price buy() like()
toy.
likes and it must cost less than 50 Euro.
data glove and a head-mounted display. He likes it. An assistant helps him. The suitability of the game depends on the age of the child. His daughter is only 3 years old. The assistant recommends another type
“Monopoly".
The use case should terminate with the customer leaving the store
Grammatical construct UML Component Concrete Person, Thing Object noun class verb Operation Classifying verb Inheritance Possessive Verb Aggregation modal Verb Constraint Adjective Attribute Intransitive verb Operation (Event)
Example “Monopoly" “toy" “enters" “is a" ,“either..or", “kind of…" "Has a ", “consists of" “must be", “less than…" "3 years old" “depends on…."
has three compartments:
performs and even the information it is responsible to keep and provide)
Sharif University of Technology 14
for example, customer, product.
the responsibilities compartment of the note.
collaborators in the collaborators compartment of the note.
15
Certain sticky notes will represent key business concepts and clearly need to become classes.
indication that it represents an attribute.
interesting behavior, see if it can be made an attribute of another class.
Sharif University of Technology 16
list of classes should provide instances which implement the behavior needed for the use cases;
Sharif University of Technology 17
Sharif University of Technology 18
elements
<<Entity>> Year <<Entitity>> Month <<Entity>> Day <<Control>> ChangeDate <<Boundary>> Button
<<Boundary>> LCDDisplay
World or system?
recommend suffixes:
ChangeDate_ Control
Button_Boundary LCDDisplay_Boundary
and conceptual entities;
indicate classes.
possible classes; beware of paperwork supporting the redundant business processes that the new system might be trying to replace.
peripherals, and other systems can be a source of candidate classes, especially for embedded systems.
business but are not manifest as concrete things; such as enrollment, educational program, and alarm condition.
Sharif University of Technology 22
examination of other sources of classes.
Sharif University of Technology 23
Sharif University of Technology 24