While designing a system, one should know all the requirements or needs of the plan beforehand, and to do so, we should use a systematic approach to analyze the goal and conditions of the system and then the same process should be used to design the system. Let us now discuss one of the most commonly used approaches.
The procedure followed to recognize the Software Engineering requirements to build a software model comprising interactive objects is called Object-Oriented analysis. This is the first technical step toward making any object-oriented software engineering model.
The critical difference between object-oriented analysis and other approaches is that the traditional methods identify and interact with data and function separately. In contrast, the requirement is integrated around the objects comprising data and functions in this approach.
The objects are modelled after the real-world entities with which the system would interact. OOA introduces various new concepts that can be used to investigate the problem efficiently. The OOA is based on a set of fundamental principles like:
- Information is collected.
- Recognizing the different types of objects that the system would interact with.
- Creating an Object model diagram to arrange the objects.
- Identifying the attributes of the object.
- Defining the action or declaring the functions that can be called on the object.
- Describing the ways the objects would interact.
Once the model is created using the object-oriented analysis approach, we use the same model to make the final software product. The model designed by this approach provides us with different levels of modularity. In simple words, each principal component is further divided into sub-systems. All the data manipulation functionalities are encapsulated in the form of objects that act as the modular building blocks of an object-oriented system.
While designing the model using the OOD approach, one must also specify the required information regarding the organization of data in the attributes and the description of the procedure of each operation. The OO design approach uses a pyramid to represent each system layer. There are primarily four layers in the Object-Oriented design pyramid, namely:
1. The Subsystem Layer
This layer is the lowest in the Object-oriented design pyramid and represents the sub-system that would enable the software to achieve user requirements. This is also responsible for the implementation frameworks to fulfil user needs.
2. The class and object layer
As the name suggests, this layer basically just represents the hierarchical order of the classes that would build the entire system. The system is developed by using simple generalization and specialization techniques for these classes. This layer also represents each object of the respective classes.
3. The message layer
This layer represents the design details that enable the objects of different classes to communicate with their respective parent classes. This layer establishes the internal and external interfaces of a system.
4. The responsibilities layer
The Responsibilities layer represents the data structure and algorithmic design for all the attributes and operations that would be performed on each object.
These layers collectively form the Object Oriented design pyramid, which specially focuses on the system or software it is designing. The primary point to remember is that the OOD pyramid cannot work individually; it rests on another already existing design layer. The object-oriented design model focuses on the core layer that plays an effective role in constructing the infrastructure.
While designing a system using the object-oriented design approach, you may come across many terms related to object-oriented programming concepts; let us understand some of them.
- Attributes: A set of data or properties that are usually used to describe a class.
- Class: A finite scope entity that is used to encapsulate the data and procedural abstractions that would be required to describe the content and behavior of the real-world entities. It can also be understood as the collection of similar objects.
- Objects: The instances of a class that inherit all the properties and operations of their parent class.
- Operations: The methods or services that are performed on the object of a class to change its behavior or attributes.
- Sub-Class: A specialized version of an existing class that inherit all the properties and behavior of a superclass.
- Superclass: This is the base class or, simply said, the generalized set of subclasses related to it.