0% found this document useful (0 votes)
13 views2 pages

DSE2153-QP-Format D1 Scheme

The document outlines the in-semester examination details for the Object Oriented Programming subject for B.Tech students, including the exam date, time, and maximum marks. It provides a series of programming questions that require students to demonstrate their understanding of concepts such as multiple inheritance, exception handling, constructors, and collections in Java. Each question specifies the required components and marks distribution for a comprehensive assessment of the students' programming skills.

Uploaded by

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

DSE2153-QP-Format D1 Scheme

The document outlines the in-semester examination details for the Object Oriented Programming subject for B.Tech students, including the exam date, time, and maximum marks. It provides a series of programming questions that require students to demonstrate their understanding of concepts such as multiple inheritance, exception handling, constructors, and collections in Java. Each question specifies the required components and marks distribution for a comprehensive assessment of the students' programming skills.

Uploaded by

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

III SEM. B.

TECH (DSE) IN-SEMESTER EXAMINATIONS


Dec 2021
SUBJECT: OBJECT ORIENTED PROGRAMMING [DSE-2153]
Date of Exam: 16/12/2021 Time of Exam: 10:30 am– 12:00 noon Max. Marks: 20
Scheme: Marks Distribution
❖ For 4 M Questions: Theory(T)+Concept(C) + Syntax(S) + Logic(L) + Completeness(Cp)
❖ For 3 M Questions: Theory(T)+Concept(C) + Syntax(S) + Logic(L)

1 Explain multiple inheritances using an abstract class with respective syntax. Write a 4
suitable program to demonstrate the same using the following scenario:
Create a “Movie” class with two methods as “plot()” and “getName()”. Extend a
minimum of Five movies as different classes from the base class Movies and redefined
“plot()” and “getName()” as their methods. Display method overloading. For every
random number generated in the main class, the respective movie name with the plot
should be displayed. Show how super, this and final keywords are used.
(0.5+1+1+1+0.5)

2 Differentiate between compile time and runtime exception with respective examples. 4
Write a suitable program to demonstrate the same using the following scenario:
Design a Java program to search the name of a Student from a class. Assume an array
of 5 students with respective details (RegNo, FirstName, LastName, Course). When a
student has to be searched, his “FirstName” should be given as input and we search
using string manipulation. [Note: create a minimum 5 student objects as array
elements and handle “ArrayIndexOutOfBoundsException” and
“InputMismatchException”] (0.5+1+1+1+0.5)

3 Why are constructors important in object-oriented programming? Write a suitable 3


program to show the uses of constructors using the program for following scenario:

Create a “Mobile” class that holds 5 Mobile objects. The Mobile class shall take 5
attributes from the user as “modelID” (int), “ram” (int), “company_name” (String),
“isTouchScreen” (boolean) and “price” (double). Write two methods as
“mobileDetails()” and “mobilePrice()” to display details of mobile and price associated
with the mobileID. Show constructor overloading in passing parameters to the above
methods. (0.5+1+1+0.5)

4 What are the differences between List and Set in Java? Write a suitable program to 3
demonstrate them using the following scenario:
The Class “Home” has a list “furniture” and a set “electricalAppliances” to store 10
string items of the home. If there is no item to enter, then collections will have “Null”
items. Class “Home” has methods “read”, “check” and “display” to do the
corresponding tasks. The method “check” throws “DuplicateItemFoundException”
when “furniture” and “electricalAppliances” have duplicate items in the collection.
The class “MainClass” creates an array of “Home” objects to store items for 5 homes.
Page 1 of 2
(0.5+1+1+0.5)

5 What would be your choice between interface and abstract class for the following 3
scenario. Give two reasons for your choice.
Write a suitable program to demonstrate the same using the following scenario: The
class “Bike” has “gearsCount” and “passengerCount”. The class “Car” has
“gearsCount” and “passengerCount”. The class “Vehicle” uses “Bike” and “Car” to
decide the vehicle detail entered is 2-Wheeler or 4-Wheeler in method “input”.
(0.5+1+1+0.5)

6 Write a program to read all lines from the file “sample.txt” in class “ReadLine” and 3
stores them in string “s1”. The method “process” searches for string “s2” and replaces
it with string “s3”. The updated string “s1” is stored in the file “updated.txt” through
method “fileUpdate”. The main class “MainClass” creates objects and calls the
methods to do tasks. Consider suitable exceptions in the program. (0.5+1+1+0.5)

Page 2 of 2

You might also like