2.2 Object-Oriented Analysis Flashcards
What is analysis?
The process of understanding a problem.
What is OOA?
Object-oriented Analysis (OOA) is a requirements analysis technique
It models real-world objects based on their descriptions in natural language
It produces an object analysis model expressed in UML class model diagrams.
What was the precursor to OOA?
Before OOA, the predominant method was structured design (aka functional decomposition).
Functional decomposition was concerned with the functions the solution needed to provide rather than the objects.
Compare Object-oriented Analysis vs Structured Analysis
- Structured analysis is primary concerned with functions while object analysis is primarily concerned with data objects
When you receive a textual description of a system to be built, what should you be looking for to start object-oriented analysis?
Take a textual description of a system to be built (e.g., requirements) and look for NOUNs, VERBs, and ADJECTIVEs.
Use identified words to build up descriptions of classes and their relationships.
- Nouns -> classes
- Action verbs -> operations
- Adjectives -> attributes
- Stative verbs -> relationships
What are the steps in OOA?
- Look for NOUNs -> model as classes
- Look for ADJECTIVEs -> model as attributes
- Look for ACTION VERBs -> model as operations assigned to an appropriate provider class
- Look for STATIVE VERBs -> model as relationships among classes
What is a Generalization relationship?
Indicates that instances of one of the two classes (the child class) is a kind of the other class (the parent class)
Look for words like:
- is a
- kind of
- type of
What is an Aggregation relationship?
Aggregations are collections of some sort.
Look for words like:
- consists of
- part of
- contains
- has
- incorporates
- belongs to
What is an Association relationship?
A state of being :/
e.g., a counter counts leaves, so the Counter class is associated with the Leaf class