Earlier in the course, we defined four views of the software development lifecycle:
This module begins our coverage of the logical view.
Polymorphism refers to the capability of having methods with the same names and parameter types exhibit different behavior depending on the receiver.
In other words, you can send the same message to two different objects and they can respond in different ways. More generally, the capability of using names to mean different things in different contexts is called overloading. This also includes allowing two methods to have the same name but different parameters types, with different behavior depending on the parameter types.
The capability of using words or names to mean different things in different contexts is an important part of the power of natural languages.
People begin developing the skills for using it in early childhood.
The Logical View
Once you define the expectations of the users in the
use case view, you then do most of your work in the logical view. Six different diagrams are included in the logical view:
- the class diagram,
- the object diagram,
- the dynamic models,
- the sequence diagram,
- collaboration diagrams, and
- the activity diagram.
Each diagram is a tool for discovering and describing different aspects of the system. Together they provide a complete description of your software solution. The class diagram is the most important by far, but every model needs to be tested. Use cases provide the high-level test plan. The object diagram is ideal for testing the class diagram. The dynamic models, sequence, and collaboration diagrams are excellent for describing object interactions. The activity diagram is very good for describing the functional behavior implemented by objects.
- The Class Diagram:
This module will describe the class diagram and its notation and usage. We'll cover how to define individual classes and how to assemble classes to build models. Remember that although the notation and techniques may be standard, their application in real-world projects may vary widely.