Object Oriented Analysis and Designing Basics
Tags: programming, tutorial
Published: 2023-12-25 19:17:45

There are various concepts involved while developing a software, such as:

1. *Object-Oriented Analysis(OOA)*:It involves investigating a problem domain to identify the objects and their relationships that are relevant to the problem

2. *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:*

1. Object-Oriented Programming: involves modeling real-world objects as software objects, with properties and methods that represent the behavior of those objects

2. Design Patterns: Design patterns are reusable solutions to common problems in software design.

3. UML Diagrams: OOAD uses UML diagrams to represent the different components and interactions of a software system.

4. 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?

1. Reusability
2. Scalability
3. Maintainability
4. Flexibility

#What are the disadvantages of it?

1. Complex to design
2. Time-Complexity
3. Difficult to make changes, once it has been designed
4. 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:*##

1. *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

2. *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.

3. *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 function

4. *Abstraction*: is the removal of the irrelevant and the amplification of the essentials.

5. *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. 

6. *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.

7. *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:
1. *Identifying the Object*
2. *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.
3. *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...
4. *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
5. *Design of Relationships*: The strategy to implement the relationships needs to be chalked out during the 
object design phase.
6. *Implementation of control for external interactions*
7. *Package classes and associations into modules*: Hiding Internal Information from Outside view, Coherence of Elements, and Construction of Physical Modules

###*Design Optimizations methods:*###

1. Addition of Redundant Associations
2. Omission of Non-Usable Associations
3. Optimization of Algorithms
4. Saving and Storing of Derived Attributes

Thanks for Reading the Tutorial
![Thanks](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3rqrfty2uebr8sthi9qi.gif)

If you have any feedback, then you can DM me on [Twitter](https://twitter.com/DhruvTr89566170) or [Linkedin](https://www.linkedin.com/in/dhruv-trivedi-06a767228/).