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 Programming
    COMP2111
    Progress0 / 23 topics
    Topics
    1. Introduction to object oriented design2. History and advantages of object oriented design3. Introduction to object oriented programming concepts4. Classes and objects5. Data encapsulation6. Constructors and destructors7. Access modifiers8. Const vs non-const functions9. Static data members & functions10. Function overloading11. Operator overloading12. Identification of classes and their relationships13. Composition and aggregation14. Inheritance15. Multiple inheritance16. Polymorphism17. Abstract classes and interfaces18. Generic programming concepts19. Function & class templates20. Standard template library21. Object streams22. Data and object serialization using object streams23. Exception handling
    COMP2111›Introduction to object oriented design
    Object Oriented ProgrammingTopic 1 of 23

    Introduction to object oriented design

    2 minread
    391words
    Beginnerlevel

    Object-Oriented Programming (OOP) – Introduction to Object-Oriented Design

    Object-oriented design is a way of planning and organizing software by focusing on real-world concepts. In this method, software is built around objects, which are like small programs that have their own data and functions. These objects work together to solve a problem or perform a task.

    In traditional programming (called procedural programming), the focus is on writing functions and procedures that operate on data. But in object-oriented programming, the focus is on creating objects that hold both data and behavior. This makes the program more organized, reusable, and easier to manage.

    Main Ideas in Object-Oriented Design:

    1. Classes and Objects
      A class is a blueprint or template for creating objects. It defines what data (called attributes) and what actions (called methods or functions) an object will have.
      An object is an actual instance of a class. It has real values and can perform actions.

    2. Encapsulation
      Encapsulation means keeping the data (variables) and code (functions) together inside an object. It also means hiding the internal details of how an object works, so that the outside world can only use what is necessary. This protects the data and makes the code easier to change and maintain.

    3. Abstraction
      Abstraction means focusing on important features and ignoring the details. For example, when using a mobile phone, we only need to know how to use the apps, not how the circuits inside work. Similarly, in programming, we create simple interfaces for users and hide the complex inner workings.

    4. Inheritance
      Inheritance allows a class to use the properties and methods of another class. The new class is called a derived or child class, and the class it inherits from is called a base or parent class. This helps to reuse code and build a relationship between classes.

    5. Polymorphism
      Polymorphism means the ability to take many forms. In programming, it allows functions or methods to behave differently based on the object that is calling them. It helps in writing flexible and easily extendable code.

    Benefits of Object-Oriented Design:

    • Makes programs easier to understand and manage
    • Encourages code reuse through inheritance
    • Easier to make changes without affecting other parts of the program
    • Allows better structure and organization of code

    Object-oriented design is widely used in modern software development because it helps build large, complex programs in a clear and efficient way.

    Next topic 2
    History and advantages of object oriented design

    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 count391
      Code examples0
      DifficultyBeginner