[[Object-Oriented Design]] ([[OOD]]) and [[Object-Oriented Programming]] ([[OOP]]) are closely linked concepts within the field of software development, focusing on using objects and classes to create more modular, reusable, and manageable code. Here's an overview of each concept and how they relate to each other: ### Object-Oriented Design (OOD) Object-Oriented Design is the process of planning a system of interacting objects for the purpose of solving a software problem. It is an approach used in software engineering that involves designing software systems to make them easy to understand, simple to modify, capable of being reused, and robust enough to handle any errors during execution. **Key Principles of OOD include:** 1. **Encapsulation**: This involves bundling the data (attributes) and methods (functions or procedures) that operate on the data into a single unit or class. Encapsulation helps to hide the internal state of the object from the outside world, only allowing access through well-defined interfaces. 2. **Abstraction**: Abstraction means hiding the complex reality while exposing only the necessary parts. It helps in handling complexity by reducing and isolating the impact of changes made to the code. 3. **Inheritance**: This allows a new class to inherit properties and methods from an existing class. Inheritance facilitates reuse and can be used to promote dynamic responses to requests for actions. 4. **Polymorphism**: Polymorphism allows entities to be represented in multiple forms. It enables one interface to be used for a general class of actions and individual objects to provide the specific action implementation. OOD uses these principles to define the software architecture with objects, their roles, relationships, and collaborations. It involves conceptualizing the software structure and behavior in terms of classes and objects that mirror real-world entities and phenomena, making the design process intuitive and aligned with human thinking. ### Object-Oriented Programming (OOP) [[Object-Oriented Programming]] is the implementation of an object-oriented design in the form of a working system. It is a programming paradigm based on the concept of "objects", which can contain data in the form of fields (often known as attributes or properties), and code, in the form of procedures (often known as methods). **Languages that support OOP (such as Java, Python, C++, and others) provide features to directly implement the concepts of OOD:** - **Classes and Objects**: The blueprint from which individual objects are created. - **Methods**: Functions that express the behavior of the objects. - **Instance Variables**: Data that is unique to each object. ### Relationship Between OOD and OOP - **Conceptualization to Implementation**: [[OOD]] serves as the blueprint or architectural design for software, which is then realized practically through [[OOP]]. [[OOD]] concerns itself with the logical structuring of a problem domain across a system, while OOP involves the concrete implementation of this design in a specific programming language. - **Seamless Transition**: The design principles used in OOD directly translate into programming constructs in OOP. This provides a seamless transition from design to implementation, ensuring that the software is built on a solid foundation of robust design principles. - **Maintainability and Scalability**: By using OOD to structure solutions and OOP to implement them, software development projects can achieve higher levels of maintainability and scalability. Changes in software requirements or functionality can be managed more effectively when the system is well-designed and objects are properly encapsulated. In summary, Object-Oriented Design and Object-Oriented Programming are interconnected disciplines that, when used together, allow developers to create systems that are more modular, easy to understand, and capable of adapting to changing requirements over time. # References ```dataview Table title as Title, authors as Authors where contains(subject, "object-oriented design") or contains(subject, "OOD") sort title, authors, modified, desc ```