0% found this document useful (0 votes)
2 views1 page

Object-Oriented Programming With Java

This document is a question paper for a 3-hour examination on Object-Oriented Programming with Java, totaling 70 marks. It consists of three sections: short answer questions, medium answer questions, and long answer/application-based questions, covering various OOP concepts and Java programming techniques. Students are required to answer all questions in Section A and select from the questions in Sections B and C.

Uploaded by

adsavakin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Object-Oriented Programming With Java

This document is a question paper for a 3-hour examination on Object-Oriented Programming with Java, totaling 70 marks. It consists of three sections: short answer questions, medium answer questions, and long answer/application-based questions, covering various OOP concepts and Java programming techniques. Students are required to answer all questions in Section A and select from the questions in Sections B and C.

Uploaded by

adsavakin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

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.

---

You might also like