Object-Oriented Software Development Notes
1. Introduction: Two Views of Software Development
Structured Systems Analysis and Design (SSAD)
- Breaks systems into processes and data flows, focusing on functional decomposition.
- Uses procedural programming, separating data and functions.
- Relies on tools like data flow diagrams (DFDs) and entity-relationship diagrams (ERDs).
- Challenges: Hard to maintain, less adaptable to changes, and struggles with complex systems.
Object-Oriented Analysis and Design (OOAD)
- Models systems as collections of interacting objects that combine data and behavior.
- Promotes modularity, reusability, and scalability.
- Aligns with real-world problem domains, making systems easier to understand and evolve.
Key Difference: SSAD emphasizes "what the system does" (functions), while OOAD focuses on "what the system is" (objects and interactions).
2. Why Object-Orientation?
- Natural Modeling: Objects reflect real-world entities, making systems intuitive.
- Modularity: Encapsulation and clear interfaces reduce complexity.
- Reusability: Inheritance and polymorphism enable code reuse, saving development time.
- Maintainability: Encapsulated objects are easier to modify without impacting the entire system.
- Scalability: OO systems handle large, complex projects effectively.
- Business Alignment: OOAD aligns software design with business processes, improving stakeholder communication.
Key Principles of OOAD
3. Objects and Classes
- Objects: Fundamental units representing entities with state (data) and behavior (methods). Example: A "Car" object has attributes like color and speed, and behaviors like drive or stop.
- Classes: Blueprints defining the structure and behavior of objects. Example: A "Car" class specifies properties and methods shared by all car objects.
- Relationship: Objects are instances of classes; a class is a template, and an object is its concrete realization.
- Key Benefit: Classes provide abstraction, ensuring reuse and consistency across objects.
4. Abstraction and Encapsulation
- Abstraction: Simplifies systems by focusing on essential characteristics and ignoring irrelevant details. Example: A "Bank Account" class abstracts balance and transactions, hiding internal calculations.
- Encapsulation: Bundles data and methods within an object, restricting direct access to its internal state. Ensures data integrity and modularity by exposing only necessary interfaces.
- Benefits: Reduces complexity, enhances maintainability, and supports information hiding.
5. Methods and Messages
- Methods: Functions or procedures within a class that define an object’s behavior. Example: A "Dog" class may have a "bark" method.
- Messages: Requests sent to objects to invoke their methods. Example: Sending a "bark" message to a Dog object triggers its bark method.
- Key Benefit: Messages enable object interaction, supporting dynamic and flexible system behavior while maintaining loose coupling through well-defined interfaces.
6. Interfaces, Inheritance, and Polymorphism
- Interfaces: Define a contract of methods a class must implement, without specifying how. Example: A "Drawable" interface for shapes ensures consistent method signatures.
- Inheritance: Allows a subclass to inherit attributes and methods from a superclass. Example: A "SportsCar" class inherits from a "Car" class, adding specialized features.
- Polymorphism: Enables objects of different classes to be treated uniformly via a common interface or superclass. Example: A "Shape" superclass allows "Circle" and "Rectangle" objects to respond to a "draw" method differently.
- Benefits: Interfaces promote interoperability, inheritance supports code reuse, and polymorphism enhances flexibility and extensibility.
7. Access Control
- Definition: Mechanisms to restrict access to an object’s data and methods using modifiers like public, private, or protected.
- Purpose: Protects data integrity by preventing unauthorized access and supports encapsulation by exposing only necessary parts of an object.
- Example: A "Bank Account" class may have a private balance attribute, accessible only through public deposit or withdraw methods.
- Key Benefit: Ensures robust, secure, and maintainable systems.
8. The Business Case for OO Development
- Cost Efficiency: Reusability through inheritance and polymorphism reduces development and maintenance costs.
- Adaptability: Encapsulation and modularity make systems easier to modify for changing business needs.
- Scalability: OO systems effectively manage growing complexity, ideal for large-scale enterprise applications.
- Improved Communication: Object models align with business domains, easing collaboration between developers and stakeholders.
- Faster Development: Reusable components and frameworks accelerate development cycles.
- Competitive Advantage: OOAD supports rapid prototyping and iterative development, enabling quick responses to market demands.
Object Oriented Analysis & Design U1 Past Exam Questions
2024-25
- What do you understand by object-orientation? Explain objects and classes.
- What is Inheritance? Explain its types with a suitable example.
- What do you understand by SSAD and OOAD? Why is it important?
2023-24
- What is Polymorphism? Explain its types with a suitable example.
- What is Inheritance? Explain its types with a suitable example.
- Write short notes on:
- Interface
- Classes
- Encapsulation
- SSAD
2022-23
- Explain Object Oriented Analysis (OOA) and Object Oriented Design (OOD) in brief. Differentiate SSAD and OOAD.
- Explain object oriented methodology with examples of any two methods.
- Write short notes on:
- Abstraction and Encapsulation
- Polymorphism
2021
- What do you understand by SSAD and OOAD? Why is it important?
- What do you mean by object oriented software engineering? Explain its characteristics in detail.
- Describe object oriented design modelling and analysis.
2019 & 2018-19
2019
- Describe the software development process. Write the difference between SSAD and OOAD.
- Explain the following terms:
- Abstraction and Encapsulation
- Interface
- Inheritance
- Explain Booch methodology of object oriented design.
2018-19
- Describe the software development process. Write the difference between SSAD and OOAD.
- Explain Booch methodology of object oriented design.
- What is an object and class? Distinguish between method and message in object.
2017 & 2015
2017
- Explain the various models available in object oriented languages. Also explain the relationship among different models.
- What are the object modeling techniques given by Rumbaugh? Explain with example.
- Write short notes on:
- Inheritance and Polymorphism
- Abstraction and Encapsulation
2015
- What are the various diagrams used in analysis and design steps of Booch Methodology? Explain with example.
- Describe the necessary conditions that a system must satisfy to be considered an object oriented system.
- Write short notes on any two:
- Object Oriented Analysis — Coad-Yourdan
- Methods and Message
- Business case of OO development
References
- Booch, G. (1994). Object-Oriented Analysis and Design with Applications. Benjamin/Cummings.
- Rumbaugh, J., Blaha, M., Premerlani, W., et al. (191). Object-Oriented Modeling and Design. Prentice Hall.
- Eliens, A. (2000). Principles of Object-Oriented Software Development. Addison Wesley.
- Bahrami, A. (1999). Object-Oriented System Development. McGraw-Hill.
- Jacobson, I. (1992). Object-Oriented Software Engineering. Pearson Education Inc.
- Wirfs-Brock, R., Wilkerson, B., & Wiener, L. (1990). Designing Object-Oriented Software. Prentice Hall.