
JAVA PROGRAMMING EXAM QUESTIONS
TOPIC: OBJECT-ORIENTED PROGRAMMING (OOP)
SECTION A: SHORT ANSWER QUESTIONS
1. Define Object-Oriented Programming (OOP).
2. State four principles of OOP.
3. What is a class in Java?
4. What is an object in Java?
5. Differentiate between a class and an object.
6. State three advantages of using OOP.
7. What is encapsulation?
8. Explain the meaning of inheritance in Java.
9. What is polymorphism?
10. State two types of polymorphism in Java.
SECTION B: STRUCTURED QUESTIONS
11. Explain the relationship between a class and an object using an example.
12. Describe the purpose of constructors in Java.
13. Write a Java class called Car with:
- Brand
- Model
- Year
Create an object and display the details.
14. Explain the difference between:
a) Method overloading
b) Method overriding
15. Describe how inheritance helps in code reuse.
16. Explain the purpose of access modifiers:
- public
- private
- protected
17. Write a Java program that creates a class Student with:
- Name
- Age
- Marks
Display student information using an object.