There are various concepts involved while developing a software, such as:
Object-Oriented Analysis(OOA):It involves investigating a problem domain to identify the objects and their relationships that are relevant to the problem
Object-oriented design (OOD): is the next step after OOA, which involves designing the software system based on the objects identified during OOA
Both combined is known as OOAD(Object-oriented analysis and design), which involves a number of techniques and practises, including object-oriented programming, design patterns, UML diagrams, and other use cases.
Here are some important aspects used in OOAD:
Object-Oriented Programming: involves modeling real-world objects as software objects, with properties and methods that represent the behavior of those objects
Design Patterns: Design patterns are reusable solutions to common problems in software design.
UML Diagrams: OOAD uses UML diagrams to represent the different components and interactions of a software system.
Use Cases: OOAD uses use cases to help developers understand the requirements of a system and to design software systems that meet those requirements.
what are the advantages of OOAD?
- Reusability
- Scalability
- Maintainability
- Flexibility
What are the disadvantages of it?
- Complex to design
- Time-Complexity
- Difficult to make changes, once it has been designed
- Cost
In one line, it is tough to build something complex
Example of Object Oriented Design:
Suppose you are designing a software system for a bank. You would start by performing object-oriented analysis to identify the objects and their relationships that are relevant to the problem. Some of the objects that you might identify include customers, accounts, and transactions. You would then use object-oriented design to create a software system based on these objects.
For example, you might create a class called Customer that has properties such as name, address, and account_number. You might also create a class called Account that has properties such as balance, interest_rate, and account_type. You would then use these classes to create a software system that allows bank staff to manage customer accounts and transactions.
MOST USED TERMS IN OBJECT-ORIENTED DESIGNING:
Objects: is an instance of a class. It is a concrete entity that has its own state and behavior, based on the properties and methods defined in the class
Class: is a blueprint or template for creating objects. It defines the properties and methods that an object will have, but it is not an object itself.
Messages: Objects communicate by message passing. Messages consist of the
integrity of the target object, the name of the requested operation, and any other
action needed to perform the functionAbstraction: is the removal of the irrelevant and the amplification of the essentials.
Encapsulation: : Encapsulation is also called an information hiding concept. Encapsulation not only bundles essential information of an object together but also restricts access to the data and methods
from the outside world.Inheritance: OOD allows similar classes to stack up in a hierarchical manner where the lower or sub-classes can import, implement, and re-use allowed variables and
functions from their immediate superclasses.Polymorphism: : OOD languages provide a mechanism where methods performing similar tasks but vary in arguments, can be assigned the same name. Depending upon how the service is invoked, the respective portion of the code gets executed.
If you are confused between Object and Class, because I was always confused in these concepts then you can remember this analogy:
Class provides the blueprint of the bicycle, but Object is the bicycle itself.
Doubt: How to design Objects?
We can Design an object in following phases:
- Identifying the Object
- Construction of design model for Object(Object Representation): Static model which describes the static structure using Class Diagram and Object Diagram. Dynamic Model which describes the dynamic structure of a system and show interaction between classes using Interaction diagrams and state-chart diagrams.
- Classification of Operations: An operation specifies what is to be done and not how it should be done!So in this phase, the operations that would be performed on objects are defined...
- Algorithm Design: The operations in the objects are defined using algorithms. An algorithm is a stepwise procedure that solves the problem laid down in an operation. Algorithms focus on how it is to be done.Computation Complexity, flexibility of the Algorithm, Understandability are the metrics for choosing the Optimal Algorithm
- Design of Relationships: The strategy to implement the relationships needs to be chalked out during the object design phase.
- Implementation of control for external interactions
- Package classes and associations into modules: Hiding Internal Information from Outside view, Coherence of Elements, and Construction of Physical Modules
Design Optimizations methods:
- Addition of Redundant Associations
- Omission of Non-Usable Associations
- Optimization of Algorithms
- Saving and Storing of Derived Attributes
Thanks for Reading the Tutorial
If you have any feedback, then you can DM me on Twitter or Linkedin.
Top comments (0)