What is an object oriented design ? Object oriented design is the process of planning a system of interacting objects for the purpose of solving a software problem. It does this by decomposing the solution into smaller pieces called objects,which is much easier to understand what is happening in the software program. Object Oriented Design is followed by Object Oriented Analysis. Some of the input for object-oriented design is provided by the output of object-oriented analysis. Both analysis and design can be performed incrementally.
W hen your design is Object Oriented? You are doing Object Oriented Design if your codes are: 1.Object Oriented 2.Re-usable 3.Can be changed with minimal effort 4.Can be extended without changing existing codes.
Features of Object Oriented Design:
Encapsulation: Encapsulation is a mechanism of wrapping( combaining ) the variables and methods together as a single unit called class. In encapsulation, the variables of a class will be hidden from other classes, and can be accessed only through the methods of their current class. Therefore this is known as data hiding. Example: A capsule which is mixed of several medicines.
Abstraction: The user will known the information on what the object does instead of how it does. Example: In the case of email, complex details such as what happens as soon as you send a email, the protocol your email server users are hidden from the user therefore, to send an email you just need to type the content, mention the address of the receiver, and click send.
Polymorphism: P olymorphism is the process where we use one object in many different forms. Example: we use milk for drinking ,but milk can also be used to make curd, butter etc.
Inheritance: Inheritance is a mechanism in which one object acquires all the properties and behaviors of a parent object. Example : Car is four wheel vehicle by making some changes it can turn into Van , Truck , Jeep etc
Advantages: Easy to understand More secure Maintainability Data reusable Development time is less Application takes less memory Lower the cost of development Increases software productivity Extensibility Reduction in Complexity
Reliability Flexibility Real world modeling Faster the development
Disadvantages: Object-oriented Development is not a panacea Steep learning curve Slower in nature Not suitable for all types of problems