Oop 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Total No. of Questions : 8] SEAT No.

:
P-9136 [Total No. of Pages : 2

[6179]-262
S.E. (Information Technology)
OBJECT ORIENTED PROGRAMMING
(2019 Pattern) (Semester - III) (214444)
Time : 2½ Hours] [Max. Marks : 70
Instructions to the candidates :
1) Answer Q.1 or Q.2, Q.3 or Q.4, Q.5 or Q.6, Q.7 or Q.8.
2) Neat diagrams must be drawn wherever necessary.
3) Figures to the right indicate full marks.
4) Assume suitable data, if necessary.

Q1) a) What is a constructor? Explain the Default constructor with an example.[6]


b) Create a Bookshop inventory class. Use appropriate constructors for
Bookshop Management. [6]
c) Can we overload the constructor? Explain with Example. [6]
OR
Q2) a) Explain the Parameterized constructor and Copy constructor with an
example. [6]
b) What is garbage collection? Explain the finalize () method in detail. [6]
c) What is a destructor? Differentiate between Constructor and Destructor.
[6]

Q3) a) What is inheritance? Explain different types of Inheritance. [6]


b) What is an interface in Java? What is the difference between interface
and abstract class? [5]
c) What is polymorphism? What are the different types of polymorphism?
Explain with an example. [6]
OR
P.T.O.
Q4) a) Design and develop inheritance for a given case study, identify objects
and relationships and implement inheritance wherever applicable,
Employee class has Emp_name, Emp_id, Address, Mail_id and
Mobile_noas members. Inherit the classes: Programmer, Team Lead,
Assistant Project Manager and Project Manager from the employee class.
Add Basic Pay (BP) as the member of all the inherited classes with 97%
of BP as DA, 10% of BP as HRA, 12% of BP as PF, and 0.1% of BP
for staff club fund. Generate pay slips for the employees with their
gross and net salary. [9]
b) Explain the concept of Method Overloading and method overriding with
examples. [8]

Q5) a) What is the Exception exception-handling mechanism in Java? Write a


java program to handle the Divide by zero exception. [8]
b) Explain user-defined exception with an example. [5]
c) Explain Collection classes in detail. [5]
OR
Q6) a) What is a generic method? Explain with a suitable example. [6]
b) Explain the use of finally in exception handling with an example. [4]
c) Write a program Java to handle Array Index Out of Bounds Exception
and Null Pointer Exception with the program. [8]

Q7) a) Define the term Stream. Explain various stream classes. [8]
b) Design a Java program for employee management with following
operations - [9]
i) Create file
ii) Write data into file
iii) Read data from file. Consider Name, employee id and department
as attributes of employee.
OR
Q8) a) Which are different types of Design patterns? [6]
b) Explain the Iterator Pattern and its advantages in detail. [6]
c) Explain the Adapter pattern and its advantages in detail. [5]



[6179]-262 2

You might also like