REVA UNIVERSITY
School of Computer Science and Engineering
Question Bank
Academic year : 2023-2024[ ODD SEMESTER]
Sub name : Object Oriented Programming Sem & Sec: 3rd Sub Code: B22EF0402
with Java
Unit 1
Chapter 1
1. A) Difference between system software and application software.
B) Difference between procedural and object oriented programming.
C) Difference between C++ and Java.
2. Explain the features or buzzwords of Java.( Simple, Object Oriented, Dynamic, robust,
Secure,Architecural neutral,Portable, Interpreted, High-Performance, Multithreaded,
Platform independent, Distributed)
3. Explain OOPS principles.( Classes and Objects, Encapsulation, Inheritance, Abstraction,
Polymorphism)
Chapter 2
4. Explain the JVM architecture(diagram+JDK+JRE)
5. With example Explain the comments in Java(single line, multiline, documentation)
6. List and Explain the primitive datatypes that are available in java. Write a program using all
primitive datatypes.(8 types)
7. Explain the different types of Type conversion along with example.(narrowing, widening)
8. Explain the variables, rules to declare variables and their types. (local ,static, instance)
9. Explain different constants and how to declare them.(Integer, real, char, string, backslash)
10. Explain scope and lifetime of variables.
11. List the operators that are available in java along with examples.(8 operators)
12. Explain the control flow statements that are available in Java.(conditional(if, if else,switch,if
else if,nested if), iterative(for,for each, while, do while) and jumping(break,continue)
13. How to declare an array and initialize it? Write a program by declaring 1D,2D,Jaged array.
14. Define class and explain the general syntax for defining a class in java with example.
15. Define object and write a program for creating an object in java.
16. What are methods, explain the types(Built in, User defined(Instance, Static Method))
17. Define constructor and explain their types (default and parameter) with example.
Unit 2
18. Define Inheritance and explain different types of inheritance with example.(Single,
Multilevel, Hierarchical, Multiple, Hybrid)
19. Does Java support multiple inheritance. Justify along with the example.
20. Explain member access rule with example(Private, Protected, Public, Default)
21. Explain the use of this and super keyword in java along with example.
22. Difference between method overloading and method overriding with examples.
Progarms
23. Write a java program to create a class called car with the following members color,
manufacturing date, vehicle Number and model. Initialize the values of the members of the
class using parameterized constructor and display the values of the members.
24. Write a program in java to perform simple mathematical operation by taking the input from
user.
25. Implement stack program with maximum stack size as 5 using class and object concept in
Java. Stack class should have push(), pop() and display() methods defined.
26. A class Box has three instance variables namely Height, Width, Depth, and it also has below
four different forms overloaded constructors and a method volume.
Box ()
Box (double h, double w, double d)
Box (double len)
Box (Box ob)
Double volume( )
Create a class Box with above instance variables and all the above constructors and a
method defined.
Create another class BoxWeight which is an inherited class of Box. BoxWeight class also
has instance variable weight with different constructors. Using super keyword call
constructors of Box class within the constructors of BoxWeight to initialize all instance
variables. Print volume by using different objects created.