Object-Oriented Programming with Java – Question Paper**
**Time:** 3 Hours
**Maximum Marks:** 70
### **Instructions:**
* All questions are **compulsory**.
* Use appropriate examples and Java syntax where required.
* Marks are indicated against each question.
---
### **Section A – Short Answer Questions (2 × 5 = 10 Marks)**
(Answer **all** questions in 2–3 lines.)
1. What is Object-Oriented Programming?
2. Define encapsulation with an example.
3. What is the use of the `final` keyword in Java?
4. List any two differences between `==` and `.equals()` in Java.
5. What is method overloading?
---
### **Section B – Medium Answer Questions (5 × 4 = 20 Marks)**
(Attempt **any 4** questions. Each carries 5 marks.)
1. Differentiate between **class** and **object** in Java with examples.
2. Explain the concept of **inheritance** with a Java program.
3. Describe **constructor overloading** with suitable code.
4. What is an interface? How is it different from an abstract class?
5. Write a Java program to demonstrate **exception handling** using `try-catch-
finally`.
6. Explain the concept of **static** keyword with variable, method, and block.
---
### **Section C – Long Answer / Application-Based (4 × 10 = 40 Marks)**
(Attempt **any 4** questions. Each carries 10 marks.)
1. Write a Java program to create a class called `Employee` with attributes and
methods. Include constructor, setters/getters, and a method to display employee
details.
2. Explain **polymorphism** with both compile-time and run-time examples in Java.
3. What is a package in Java? Create a user-defined package with classes and
explain how to import and use it.
4. Write a Java program that reads input from a file and counts the number of words
using `FileReader` and `BufferedReader`.
5. Explain **multithreading** in Java. Write a program that creates two threads and
executes them concurrently.
6. Describe **Java Collection Framework**. Write a program using `ArrayList` to
store and display student names.
---