Object Oriented Programming with Java (CS2024) Midterm 2025 Question Paper
RV University Midterm exam for Object Oriented Programming with Java (CS2024), held 2025, semester 3, with 9 questions. Also searched as OOP, JAVA. Last updated 2026-11-14.
Questions
1. Which of the following is not a correct statement about abstract classes?(a) Every class containing an abstract method must be declared abstract (b) Abstract class defines only the structure of the class, not it's implementation (c) Abstract class can be initiated by the new oper
2. What is the size of the float data type in Java?(a) 4 bits (b) 32 bits (c) 16 bits (d) 64 bits
3. Which type of relationship does inheritance explain in Java?(a) IS-A (b) HAS-A (c) USES-A (d) CAN-BE
4. Which access modifier allows access only within the same package and to subclasses in other packages?(a) Private (b) Public (c) Protected (d) Default
5. What is the process of defining a method in a subclass that has the same name and parameter list as a method in its superclass?(a) Method overloading (b) Method overriding (c) Method hiding (d) Method duplication
6. Write a Java program that creates a class hierarchy for different types of bank accounts. The base class should be BankAccount, with subclasses SavingsAccount, CurrentAccount, and FixedDepositAccount. Each subclass should have properties such as account holder's name, account num
7. (a) Explain about the 'super' keyword in Java. (b) Write a Java program to calculate the volume of a box using this keyword and multiple constructors.(Hint: Volume of a box = lengthwidthbreadth)
8. Write a Java program to concatenate one character and a string, and multiply three integers using method overloading.
9. Write a program to create an abstract class Shape2D with an abstract method area(). Create two subclasses for the class Shape2D to calculate the area of a square and area of a triangle using runtime polymorphism.(Hint: Area of a square = side side, Area of a triangle =0.5 base he