ScholarQuill logoScholarQuillUniversity Notes
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
Study Tools
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
Contact
ScholarQuill logo
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
ScholarQuill logoScholarQuillUniversity Notes
Study PortalCOMP3150Oop Review
Ctrl + K
Login
Explore
Search
Semester
Papers
CGPA
    COMP3150

    Object Oriented Analysis and Design

    Progress0 / 17 done
    Topics17
    1Principles of Object Technology2OOP Review3Principles of Modeling4OOA&D Overview5OO Development Process
    6Use Cases and Prototyping7Class Models8Interaction Diagrams9Verification and Validation10Architectural and Detailed Design11Class Diagrams12State Machines and Diagrams13Implementation and Package Diagrams14Activity Diagrams15OO Patterns16Object Diagram, Component Diagram, and Deployment Diagram17Network Diagram
    2 min read
    Topic 2 of 17
    Topic Study Note Illustration
    02

    OOP Review

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

    ๐Ÿ“˜ 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 view and download past papers

    Click on Show Past Papers to load available exam papers.

    Reading Progress
    0%
    2mremaining
    400words
    Beginnerlevel
    On This Page

    No headings found

    Study Toolkit

    Subject Portal

    Object Oriented Analysis and Design