Object Oriented Programming (OOP) SPPU Endsem Question Paper May 2024
All 8 questions from this SPPU endsem paper, as printed. Read them here or open the PDF.
- Subject code
- 214444
- Pattern
- 2019 pattern
- Exam
- Endsem
- Session
- May 2024
- Max. marks
- 70
- Time
- 2½ Hours
- Semester
- III
- Paper code
- [6261]-62
Printed for: S.E. (I.T.)
Instructions to the candidates
- Answer Q1 or Q2, Q3 or Q4, Q5 or Q6, Q7 or Q8.
- Neat diagram must be drawn wherever necessary
- Figures to the right side indicate full marks.
- Assume suitable data if necessary.
Questions
Q1
- a)[9]
Write a short note on ‘Symbolic Constants’ in Java.
- b)[9]
Discuss Constructor Overloading with suitable code.
OR- a)
Q2
- a)[9]
How are objects initialized dynamically? Explain with an example.
- b)[9]
What is garbage collection in OOP? Explain finalize() method in Java.
- a)
Q3
- a)[9]
Define a class ‘shape’ with abstract method compute_area(). Derive the classes ‘circle’ and ‘rectangle’ from ‘shape’ class. Calculate the area of circle and rectangle using Dynamic Binding. Use appropriate instance variables and methods whenever necessary.
- b)[8]
Discuss diamond problem in detail? How it can be solved?
OR- a)
Q4
- a)[9]
Design a class ‘person1’ with instance variables ‘name’ and ‘age’. Derive a class ‘person2’ from ‘person1’ class with instance variable ‘gender’.Derive a class ‘employee’ from ‘person2’ class with instance variable ‘address’. Create a database of the 3 employees. Use the appropriate methods to accept and display the data.
- b)[8]
Define Polymorphism? Differentiate between Compile Time Polymorphism and Run Time Polymorphism with an example. 2
- a)
Q5
- a)[9]
Can we throw an exception explicitly or manually? If ‘yes’, justify your answer with an example.
- b)[9]
What is Generic Programming? Discuss any four methods of LinkedList class with their syntax.
OR- a)
Q6
- a)[9]
Differentiate between an array and ArrayList class. Explain following methods of ArrayList class. i) add() ii) get() iii) remove()
- b)[9]
Implement a program which handle Arraylndex Out of Bound Exception
- a)
Q7
- a)[9]
What is a Design Pattern? Write a short note on ‘Iterator’ design pattern.
- b)[8]
How do you write to a file and read from a file using FileWriter and FileReader class, respectively?
OR- a)
Q8
- a)[9]
How are input/output exceptions handled in File Handling? Explain with an example
- b)[8]
This part has equations that don’t show as text. Open the PDF to read it.
- a)