Computer Science · Class 11
Object Oriented Concepts
Learn Object Oriented Concepts with notes, examples, and practice questions.
3 sections15–25 min read6 MCQs · 2 examples
Chapter Overview
Object Oriented Concepts introduces classes, objects, attributes, methods, and encapsulation — organising code with Object-Oriented Programming for Class 11.
Classes and Objects
- Class: blueprint; Object: instance of class
- __init__ constructor sets attributes
- self refers to current object
- Dot notation: obj.method()
OOP Principles
- Encapsulation: bind data and methods
- Inheritance: child class extends parent
- Polymorphism: same interface, different behaviour
Solved Examples
Step-by-step solutions — read each step before checking the final answer.
Create object
Create Student('Riya', 88) and access name.
- 1s = Student('Riya', 88)
- 2s.name returns 'Riya'
Answer
s.name → 'Riya'
Method call
What does s.grade() do if marks=95?
- 1grade() checks self.marks
- 295 >= 90 → returns 'A'
Answer
Returns 'A'
Key Points to Remember
- ✓ Class defines structure; object is real instance
- ✓ self is first parameter of instance methods
- ✓ Inheritance uses class Child(Parent):
Exam Tips
- • Write class with __init__ and one method
- • Explain encapsulation with example
- • Draw class-object diagram
Practice MCQs — Object Oriented Concepts
Test your understanding with topic-wise multiple choice questions. Explanations appear after each answer.
Question 1 of 6Score: 0/0
Object is: