Unit 5 - Basic Object Oriented Design
Unit 5 - Basic Object Oriented Design
• Object Oriented programming maps real world objects and classify them into classes
according to similar attributes
• Structures and classes are the most important data structures used in Object-Oriented
programming
• Abstraction refers to the process of exposing only the relevant and essential data to
the users without showing unnecessary information.
• Polymorphism - Allows you to use an entity in multiple forms.
• Encapsulation - Prevents the data from unwanted access by binding of code and data
in a single unit called object.
• Inheritance - Promotes the reusability of code and eliminates the use of redundant
code. It is the property through which a child class obtains all the features defined in
its parent class
Summary
Any Question?
Activities
1. What is the difference between an OO programming and procedural programming?
2. Explain the concept of object and classification in object oriented programming.
3. How does the principle of inheritance make programming easier? Support your answer
with the help of a diagram.
4. Describe the principles of encapsulation, polymorphism and abstraction in object oriented
language.
5. Which of the following are object oriented languages?
• Android
• Visual Basic 6.0
• Csharp
• C
• C++
• Java
Activities
6. Explain the following keywords related to classes:
• Public
• Private
• Protected
• Abstract
• Extends
• implements
7. Explain how a constructor is used in a class. What is a static constructor?
8. What do you understand by “instantiation”?
9. With the help of an example, illustrate the notion of methods in OO programming.
How can a method be overloaded?
10. Explain “events notifications” in Object-Oriented programs.