What are Analysis and Design?
The analysis emphasizes an investigation of the problem and requirements, rather than a solution. For example, if a new online trading system is desired, how will it be used? What are its functions?
The design emphasizes a conceptual solution (in software and hardware) that fulfills the requirements, rather than its implementation. For example, a description of a database schema and software objects.
What is Object-Oriented Analysis and Design?
During object-oriented analysis, there is an emphasis on finding and describing the objects — or concepts — in the problem domain. For example, in the case of the flight information system, some of the concepts include Plane, Flight, Pilot.
During object-oriented design, there is an emphasis on defining software objects and how they collaborate to fulfill the requirements.
For example, a Plane software object may have a tailNumber attribute and a getFlightHistory method (see fig.)
Finally, during implementation or object-oriented programming, design objects are implemented, such as a Plane class in Java.
An Example of Object – Oriented Analysis and Design: “A Dice Game”
The dice game is very simple problem, presented in order to focus on some of the steps and artifacts in object – oriented analysis and design rather than on the problem domain.
A "dice game" in which a player rolls two dice. If the total is seven, they win; otherwise, they lose.
Most essential and commonly used steps in OOAD:
Define Use Cases
Requirements analysis may include stories or scenarios of how people use the application; these can be written as use cases. They are a popular tool in requirements analysis.
For example, here is a brief version of the Play a Dice Game use case:
Play a Dice Game: Player requests to roll the dice. System presents results: If the dice face value totals seven, player wins; otherwise, player loses.
Use case diagram
Define a Domain Model
A decomposition of the problem domain involves an identification of
- Concepts
- Attributes
- Associations
A domain model is a visualization of the concepts of a real-world domain. Thus, it has also been called a conceptual object model.
The result can be expressed in a conceptual model, which is illustrated in a set of diagrams that depict concepts (objects).
For example, a partial domain model is shown in fig.
This model illustrates the concepts Player, Die, and DiceGame, with their associations and attributes.
Assign Object Responsibilities and Draw Interaction Diagrams
Object - oriented design is concerned with defining logical software specifications that fulfill the functional requirements based on decomposition by classes of objects.
An essential step in this phase is the allocation of responsibilities to objects and illustration how they interact via messages, expressed in collaboration diagrams.
Collaboration diagrams show the flow of messages between instances and the invocation of methods.
For example, the sequence diagram in Fig. illustrates an OO software design, by sending messages to instances of the DiceGame and Die classes. Note this illustrates a common real-world way the UML is applied: by sketching on a whiteboard.
The collaboration diagram in Figure illustrates the essential step of playing by sending messages to instances of the Player and die classes.
Define Design Class Diagrams
“These illustrate class definitions that are to be implemented in software”
In order to define a class, several questions must be answered:
- How do objects connect to other objects?
- What are the methods of a class?
0 Comments