ScholarQuill logoScholarQuillUniversity Notes
  • Notes
  • Past Papers
  • Blogs
  • Todo
Login
ScholarQuill logoScholarQuillUniversity Notes
Login
NotesPast PapersBlogsTodo
More
SubjectsDiscussionCGPA CalculatorGPA CalculatorStudent PortalCourse Outline
About
About usPrivacy PolicyReportContact
Notes
Past Papers
Blogs
Todo
Analytics
    Current Subject
    🧩
    Object Oriented Analysis and Design
    COMP3150
    Progress0 / 17 topics
    Topics
    1. Principles of Object Technology2. OOP Review3. Principles of Modeling4. OOA&D Overview5. OO Development Process6. Requirements Engineering: Use Cases and Prototyping7. Class Models8. Interaction Diagrams9. Verification and Validation10. Architectural and Detailed Design11. Class Diagrams12. State Machines and Diagrams13. Implementation and Package Diagrams14. Activity Diagrams15. OO Patterns16. Object Diagram, Component Diagram, and Deployment Diagram17. Network Diagram
    COMP3150›OOP Review
    Object Oriented Analysis and DesignTopic 2 of 17

    OOP Review

    2 minread
    400words
    Beginnerlevel

    📘 OOP Review (Object-Oriented Programming)


    🔹 1. What is OOP?

    Object-Oriented Programming (OOP) is a programming approach where software is designed using objects, which combine data (attributes) and behavior (methods).

    👉 Simple idea: Programs are built by modeling real-world entities like Car, Student, BankAccount as objects.


    🔹 2. Basic Building Blocks

    🔸 2.1 Class

    • A blueprint/template for creating objects
    • Defines attributes and methods

    Example:

    Class: Student
    Attributes: name, rollNo
    Methods: study(), attendClass()
    

    🔸 2.2 Object

    • An instance of a class
    • Represents a real entity

    Example:

    Student s1 = new Student();
    

    🔸 2.3 Attributes & Methods

    Component Meaning
    Attributes Data (variables)
    Methods Functions (behavior)

    🔹 3. Four Pillars of OOP ⭐


    🔸 3.1 Abstraction

    • Show only important details
    • Hide complex implementation

    Example: Using a mobile phone without knowing internal circuits


    🔸 3.2 Encapsulation

    • Wrapping data + methods together
    • Restrict direct access to data

    Example:

    private balance;
    public deposit();
    

    🔸 3.3 Inheritance

    • One class inherits properties of another

    Example:

    Animal → Dog
    

    Benefit: Code reuse


    🔸 3.4 Polymorphism

    • One function behaves differently in different situations

    Types:

    • Method Overloading
    • Method Overriding

    🔹 4. Important Concepts


    🔸 4.1 Message Passing

    Objects communicate by calling each other's methods


    🔸 4.2 Dynamic Binding

    Method call is resolved at runtime


    🔸 4.3 Association Relationships

    Type Meaning
    Association General relation
    Aggregation Weak ownership
    Composition Strong ownership

    🔸 4.4 Constructor

    • Special method used to initialize objects

    🔸 4.5 Destructor (in some languages)

    • Used to free memory/resources

    🔹 5. Advantages of OOP

    • Reusability
    • Security (data hiding)
    • Easy maintenance
    • Real-world modeling
    • Scalability

    🔹 6. Simple Example

    👉 Bank System

    Class:

    BankAccount
    - balance
    + deposit()
    + withdraw()
    

    Object:

    acc1.deposit(1000)
    

    🔹 7. OOP vs Procedural Programming

    Feature OOP Procedural
    Focus Objects Functions
    Data Security High Low
    Reusability High Limited

    🔹 8. Key Rules to Remember

    • Use classes to model real-world objects
    • Keep data private (encapsulation)
    • Use inheritance for reuse
    • Apply polymorphism for flexibility

    🔹 9. Likely Exam Questions

    1. What is OOP? Explain with example.
    2. Define class and object.
    3. Explain the four pillars of OOP.
    4. What is encapsulation and why is it important?
    5. Describe inheritance with types.
    6. What is polymorphism? Give examples.
    7. Differentiate OOP and procedural programming.
    8. What is dynamic binding?
    9. Explain aggregation vs composition.
    10. What are advantages of OOP?

    🔹 10. Quick Revision Summary 🧠

    • OOP = Objects + Classes

    • Class → Blueprint

    • Object → Instance

    • 4 Pillars:

      • Abstraction
      • Encapsulation
      • Inheritance
      • Polymorphism

    👉 Shortcut Trick: "AEIP" (Abstraction, Encapsulation, Inheritance, Polymorphism)


    Previous topic 1
    Principles of Object Technology
    Next topic 3
    Principles of Modeling

    Past Papers

    Open this section to load past papers

    Click on Show Past Papers to see past papers.
    On This Page
      Reading Stats
      Est. reading time2 min
      Word count400
      Code examples0
      DifficultyBeginner