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

Unit1&2 ImportantQP

This document contains questions about object-oriented programming concepts in Java across three parts. Some key concepts covered include procedural vs. object-oriented programming, the Java Virtual Machine, variable and data types in Java, encapsulation, polymorphism, platform independence, constructors vs. methods, operator precedence, control flow statements, arrays, inheritance, method overloading and overriding, abstract classes, interfaces, and inner classes. Example programs are provided to demonstrate classes, objects, inheritance, polymorphism, and abstract classes.

Uploaded by

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

Unit1&2 ImportantQP

This document contains questions about object-oriented programming concepts in Java across three parts. Some key concepts covered include procedural vs. object-oriented programming, the Java Virtual Machine, variable and data types in Java, encapsulation, polymorphism, platform independence, constructors vs. methods, operator precedence, control flow statements, arrays, inheritance, method overloading and overriding, abstract classes, interfaces, and inner classes. Example programs are provided to demonstrate classes, objects, inheritance, polymorphism, and abstract classes.

Uploaded by

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

OOP Important Questions

PART :A

Unit:1
PART:A
1. Differentiate procedure oriented and object-oriented programming,
2. Illustrate the working of Java Virtual Machine (JVM).
3. Why the main method of Java is assigned as public and static.
4. What is the types of variables in java? Define it.
5. What are the data types supported in Java?
6. What is encapsulation?
7. Define polymorphism.
8. Java is platform independent. Discuss
9. What is the difference between a constructor and a
10. Method?
11. What are the data types supported in Java?

PART :B
1.(i)Discuss on the various features of OOPS concept
(ii) What characteristics makes Java a preferred programming language.
2.Describe operators and operator precedence supported in Java with Examples.
3.Elaborate on various control flow statements and selection statements used in Java
(i)Demonstrate the declaration, Initialization and accessing in different types of arrays.
4.Summarize the usage of constructor in Java with examples.
PART :B &PART :C
1.Write a program using classes to generate student information system.
2.(i) Describe in brief about object class and its methods in Java.Write a program in Java to
create a class ’Box’ which contains three data members for holding width, height and length
of box and two methods ‘area’ and ‘volume’ to calculate and return the area and volume of
box. Create another class named ‘BoxDemo’ which uses Box class.
(ii) Analyse and Develop a simple Java program to sort the given numbers in increasing
order.
OOP Important Questions

UNIT:2
PART:A
1. Define method overloading and Constructor Overloading.
2. Identify the two ways of using super keyword.
3. What is the use of final class in Java?
4. What is an interface? Write the syntax of the interface
5. What is inner class and anonymous inner class?
6. When a class must be declared as abstract?
7. Outline the use of extends keyword in Java with syntax.
8. Differentiate Method overloading and Method Overriding.
9. Can we access parent class variable in child class by using super keyword?
10. What is dynamic method dispatch?

PART :B

1. Interpret with an example what is method overloading and method overriding.


2. Define inheritance. With diagrammatic illustration and Java programs explain the
different types of inheritance.
3. What is polymorphism? Differentiate between method overloading and method
overriding with an example.
4. Illustrate what is meant by package? How its types are created and implemented
in Java.
PART :C
1.Develop a Java Program to create an abstract class name Shape that contains two integers
and an empty method name printArea(). Provide three classes named Rectangle, Triangle and
Circle such that each one of the classes extends the class Shape. Each one of the classes
contains only the method printArea () that prints the area of the given shape.

2.The abstract vegetable class has three subclasses named Potato, Brinjal and Tomato. Write a
java program that demonstrates how to establish this class hierarchy. Declare one instance
variable of type String that indicates the color of a vegetable. Create and display instances of
these objects. Override the toString() method of object to return a string with the name of
vegetable and its Color.

You might also like