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

Java OOP Model Question Paper

This document is a model question paper for the BTech - CSE/Data Science program, focusing on Object Oriented Programming using Java. It includes three parts with questions covering Java features, constructors, inheritance, exception handling, and practical programming tasks. The paper is structured to assess knowledge across all five modules of the syllabus within a 90-minute timeframe for a maximum of 50 marks.

Uploaded by

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

Java OOP Model Question Paper

This document is a model question paper for the BTech - CSE/Data Science program, focusing on Object Oriented Programming using Java. It includes three parts with questions covering Java features, constructors, inheritance, exception handling, and practical programming tasks. The paper is structured to assess knowledge across all five modules of the syllabus within a 90-minute timeframe for a maximum of 50 marks.

Uploaded by

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

SCHOOL OF COMPUTER SCIENCE AND ENGINEERING

MODEL QUESTION PAPER


Program: BTech – CSE / Data Science Semester: II
Course Name: Object Oriented Programming using Java Course Code: 25ESCS03
Time: 90 minutes Max Marks: 50
Syllabus Covered: All Five Modules Pattern: Same as Internal Exam
Questions:

Part A (5 × 2 = 10 Marks) (Answer All Questions)

a. Define Java and write any two features of Java.


b. What is a constructor in Java? Mention its purpose.
c. Differentiate between method overloading and method overriding.
d. What is the use of an interface in Java?
e. What is the difference between checked and unchecked exceptions?
Part B (4 × 5 = 20 Marks) (Answer Any 4 out of 5)

a. Explain the Java compilation and execution process with suitable steps.
b. Describe constructors in Java. Explain default, parameterized, and overloaded constructors with an example.
c. Explain inheritance in Java. Differentiate between single, multilevel, and hierarchical inheritance with examples.
d. Compare abstract classes and interfaces. Also explain how multiple inheritance is achieved using interfaces.
e. Explain exception handling in Java. Discuss try, catch, finally, throw, and throws with examples.
Part C (2 × 10 = 20 Marks) (Answer Any 2 out of 3)

a. A transport booking system needs to calculate fare in different ways:


• If only distance is given, calculate basic fare.
• If distance and number of passengers are given, calculate total fare.
• If distance, passengers, and discount are given, calculate discounted fare.
How can method overloading be used to implement this? Write a Java program.
b. Create a class hierarchy for employees using inheritance. Include a base class Employee and a derived class
Manager.
Demonstrate method overriding, use of super, and runtime polymorphism with a suitable Java program.
c. Write a Java program to demonstrate multithreading using the Runnable interface. Explain thread life cycle and
show how synchronization can be used to avoid race conditions.
All questions are framed based on the provided syllabus and the same pattern as the internal exam.

You might also like