Object-Oriented Analysis and Design
Part 1: Overview and introduction
1. What Is Object-Oriented Analysis and Design (OOAD ). The essence of OOAD is to consider the problem fields and logical solutions from the perspective of objects.
OOA: focuses on discovering and describing objects.
OOD: focuses on defining logical software objects.
The difference between object-oriented and functional orientation: the library information system is used as an example.
Ii. Main OOAD processes:
3. A simple OOAD example.
This simple case analysis includes the following four main parts:
Game content: A dice game. If the total number of dice points is 7, the game wins; otherwise, it loses.
1. Define Use Cases
Use Case name: play dice
Participants: Players
Step Description: The player picks up the dice and throws it out. If the total number of dice points is 7, the game wins; otherwise, the game loses.
2. Define a domain model
OOAD focuses on creating domain descriptions from the object perspective. Define the domain knowledge of the problem to be addressed in the domain model. Identify the concepts, attributes, and associations of objects to resolve the problem.
First, we need to determine the concept categories in the field. by extracting the Terms of Use Cases, we can obtain concepts such as "players", "Dice", and "dice games. Then draw out its attributes and associations.
3. Interaction Diagram
OOAD focuses on how software objects collaborate in the problem field to solve problems. The interaction diagram includes a communication diagram and a sequence diagram. The sequence diagram is used here.
4. Define the design class diagram
In addition to displaying the dynamic view of object collaboration in the interaction diagram, you can also use the design class diagram to effectively represent the static view defined by the class.