9/3/26

OOPS through JAVA Importent Questions

           Course Outcomes

CO1: Apply object-oriented programming principles and Java program structure to write, compile, and

execute basic Java programs using appropriate data types, operators, and control statements. (K3 – Apply)

CO2: Develop and utilize classes, objects, constructors, methods, access specifiers, and method overloading/overriding to implement modular and reusable Java applications. (K3 – Apply)

CO3: Implement and analyze arrays, inheritance models, interfaces, and abstract classes to design structured and extensible Java solutions for given problems. (K4 – Analyze)

CO4: Use and evaluate Java packages, standard libraries, exception handling mechanisms, and Java I/O streams to build robust and efficient applications. (K4 – Analyze)

CO5: Develop and integrate advanced Java features including string handling, multithreading, JDBC based database connectivity, and JavaFX GUI components to create interactive and concurrent

applications. (K5 Evaluate)

Bloom's Level (OBL)

K1    (Remember)     K2 (Understand)   K3 (apply) K4 (Analyze)    K5 (Evaluate)

CO-PO Mapping

 

CO

PO1

PO2

PO3

PO4

PO5

PO6

PO7

PO8

PO9

PO10

PO11

PSO1

PSO2

PSO3

CO1

3

2

2

1

1

-

-

-

-

-

-

-

-

2

CO2

3

2

3

2

1

-

-

-

-

-

-

-

-

2

CO3

3

3

3

2

1

-

-

-

-

-

-

-

-

2

CO4

3

2

2

3

2

-

-

-

-

-

-

-

-

2

CO5

3

2

3

3

2

-

-

-

-

-

-

-

-

2

Avg

3

2.2

2.6

2.2

1.4

-

-

-

-

-

-

-

-

2


 

 

Q.No

 

QUESTIONS

 

MARKS

BT L

 

CO

 

PO

UNIT-I

 

1

Define Data Abstraction and Encapsulation with suitable examples.

 

2

 

K2

 

CO1

 

PO1

 

2

What is the purpose of public static void main (String [] args) in Java?

 

2

 

K1

 

CO1

 

PO1

 

3

Differentiate between primitive data types and reference data types in Java.

 

2

 

K2

 

CO1

 

PO1

 

4

Explain automatic type promotion (implicit casting) versus explicit type casting.

 

2

 

K2

 

CO1

 

PO1

 

5

Distinguish between bitwise logical operators (&, |) and short-circuit Boolean operators (&&, ||).

 

2

 

K2

 

CO1

 

PO1

 

6

What is the purpose of the final keyword when applied to a variable?

 

2

 

K1

 

CO1

 

PO1

 

7

How does the Scanner class read formatted input from the console? Give syntax.

 

2

 

K2

 

CO1

 

PO1

 

8

State the difference between break and continue statements inside a loop.

 

2

 

K2

 

CO1

 

PO1

 

9

What is the syntax and advantage of the enhanced for-each loop in Java?

 

2

 

K2

 

CO1

 

PO1

 

10

How do command-line arguments work in Java? How are numeric inputs parsed from them?

 

2

 

K3

 

CO1

 

PO2


 

 

Q.No

 

QUESTIONS

 

MARKS

BT L

 

CO

 

PO

 

11

Explain the basic principles of Object-Oriented Programming (OOP) supported by Java.

 

5

 

K2

 

CO1

 

PO2

 

12

Describe the various categories of operators available in Java with their precedence and associativity.

 

5

 

K2

 

CO1

 

PO2

 

13

Write a Java program that takes a student's marks via Command-Line Arguments and prints the grade using a switch statement.

 

5

 

K3

 

CO1

 

PO2

 

14

Compare and contrast while, do-while, and standard for loops with their control-flow diagrams and code snippets.

 

5

 

K2

 

CO1

 

PO2

 

15

Explain the role and scope of static variables and static methods with a worked code

example.

 

5

 

K3

 

CO1

 

PO2

 

16

Write a Java program to check whether a given integer is a prime number using formatted output via System.out.printf().

 

5

 

K3

 

CO1

 

PO2

 

 

 

 

17

(a)  Discuss the structural architecture of a Java program, detailing tokens, identifiers, literals, and comments.

(b)  Write a complete Java program to read 5 floating-point values from console input,

calculate their sum and average, and display formatted output using printf().

 

 

 

 

10

 

 

 

 

K3

 

 

 

 

CO1

 

 

 

 

PO3


 

 

Q.No

 

QUESTIONS

 

MARKS

BT L

 

CO

 

PO

 

 

 

 

18

(a)  Explain the syntax and execution flow of nested decision-making statements (nested-if, if-else-if ladder, and conditional ?: operator).

 

(b)  Develop a Java program to solve quadratic equations 𝑎𝑥2 + 𝑏𝑥 + 𝑐 = 0 considering all

discriminant conditions (Δ > 0, Δ = 0, Δ < 0).

 

 

 

 

10

 

 

 

 

K3

 

 

 

 

CO1

 

 

 

 

PO3

 

 

 

 

19

(a)  Elucidate Bitwise operators (AND, OR, XOR, Bitwise shift operators <<, >>, >>>) with binary arithmetic examples.

 

(b)  Write a Java program to reverse the digits of an integer and check if it is a Palindrome using iteration statements.

 

 

 

 

10

 

 

 

 

K3

 

 

 

 

CO1

 

 

 

 

PO3

 

 

 

 

 

20

 

 

(a)  Explain variable scope (local, instance, static) and lifetime in Java with memory layout illustrations.

(b)  Write a Java application using nested for loops to generate a Pascal's Triangle up to N rows.

 

 

 

 

 

10

 

 

 

 

 

K3

 

 

 

 

 

CO1

 

 

 

 

 

PO3

UNIT-II

 

1

Define a class and an object. How is memory allocated for an object using new?

 

2

 

K1

 

CO2

 

PO1


 

 

Q.No

 

QUESTIONS

 

MARKS

BT L

 

CO

 

PO

 

2

List the four access specifiers in Java and their visibility scope.

 

2

 

K1

 

CO2

 

PO1

 

3

What is a constructor? State two distinct rules for defining a constructor.

 

2

 

K1

 

CO2

 

PO1

 

4

State the dual uses of this keyword in Java (reference variable vs. explicit constructor invocation this()).

 

2

 

K2

 

CO2

 

PO1

 

5

Differentiate between method overloading and method overriding.

 

2

 

K2

 

CO2

 

PO1

 

6

What happens when an object reference is assigned to another object reference variable?

 

2

 

K2

 

CO2

 

PO1

 

7

Why are static methods unable to access this or instance members directly?

 

2

 

K2

 

CO2

 

PO1

 

8

Define recursion in Java. What is the role of a base termination condition?

 

2

 

K2

 

CO2

 

PO1

 

9

What is a nested class? State the difference between static nested classes and inner

classes.

 

2

 

K2

 

CO2

 

PO1

 

10

What is the effect of declaring a class as final?

 

2

 

K1

 

CO2

 

PO1

 

11

Explain constructor overloading with a suitable code example demonstrating parameterized and default constructors.

 

5

 

K3

 

CO2

 

PO2


 

 

Q.No

 

QUESTIONS

 

MARKS

BT L

 

CO

 

PO

 

12

Detail how Java implements "Pass-by-Value" for primitive types versus object references with illustrative memory diagrams.

 

5

 

K2

 

CO2

 

PO2

 

13

Write a Java program demonstrating method overloading for calculating the area of a

circle, rectangle, and triangle.

 

5

 

K3

 

CO2

 

PO2

 

14

Explain the concept and implementation of recursive methods by writing a program to compute the 𝑛th Fibonacci number.

 

5

 

K3

 

CO2

 

PO2

 

15

Describe how private members of a class are accessed and modified using public getter and setter methods (Encapsulation).

 

5

 

K3

 

CO2

 

PO2

 

16

Explain the use of the final keyword when applied to instance variables, methods, and classes.

 

5

 

K2

 

CO2

 

PO2

 

 

 

 

17

(a) Explain the complete lifecycle of an object from declaration, instantiation, and

initialization to garbage collection.

(b) Design a BankAccount class with fields accountNumber, holderName, and balance. Implement overloaded constructors and methods for deposit(), withdraw(), and

displayDetails().

 

 

 

 

10

 

 

 

 

K3

 

 

 

 

CO2

 

 

 

 

PO3

 

 

18

(a) Discuss method overloading versus method overriding with respect to method signatures, return types, binding time, and inheritance.

 

 

10

 

 

K3

 

 

CO2

 

 

PO3


 

 

Q.No

 

QUESTIONS

 

MARKS

BT L

 

CO

 

PO

 

(b) Write a Java program demonstrating

dynamic method dispatch using a base class Shape and derived classes Circle and

Rectangle.

 

 

 

 

 

 

 

19

(a) What are the different categories of Nested Classes in Java? Explain with syntax.

(b) Write a Java program where an outer class University instantiates an inner class

Department to demonstrate access to outer private members.

 

 

 

10

 

 

 

K3

 

 

 

CO2

 

 

 

PO3

 

 

 

 

20

(a) Explain the mechanism of passing objects as arguments and returning objects from methods.

(b) Develop a ComplexNumber class with attributes real and imaginary. Implement methods to add and multiply two

ComplexNumber objects, returning the result as a new object.

 

 

 

 

10

 

 

 

 

K3

 

 

 

 

CO2

 

 

 

 

PO3

UNIT-III

 

1

What is an array and how is it declared and initialized in Java?

 

2

 

K1

 

CO3

 

PO1

 

2

Define inheritance and mention its types supported in Java.

 

2

 

K1

 

CO3

 

PO1

 

3

What is the purpose of the super keyword in Java inheritance?

 

2

 

K2

 

CO3

 

PO1

4

What is an abstract class?

2

K1

CO3

PO1


 

 

Q.No

 

QUESTIONS

 

MARKS

BT L

 

CO

 

PO

 

5

How is an interface declared and implemented in Java?

 

2

 

K3

 

CO3

 

PO2

 

6

Explain the storage of arrays in computer memory and discuss various operations performed on array elements.

 

5

 

K2

 

CO3

 

PO2

 

7

Describe method overriding and explain how dynamic method dispatch works in Java.

 

5

 

K3

 

CO3

 

PO2

 

8

Discuss the significance of default methods and static methods introduced in interfaces.

 

5

 

K2

 

CO3

 

PO2

 

9

Explain the Universal Super Class (Object Class) and how constructor methods interact during inheritance.

 

5

 

K2

 

CO3

 

PO2

 

 

10

Explain the different types of inheritance supported in Java in detail. How does Java achieve multiple inheritance through

interfaces?

 

 

10

 

 

K4

 

 

CO3

 

 

PO3

 

 

11

Provide a comprehensive explanation of arrays in Java, covering one-dimensional, two-dimensional, three-dimensional arrays, arrays of varying lengths, and Class Arrays functionalities.

 

 

10

 

 

K4

 

 

CO3

 

 

PO3

 

 

12

(a)  Write a Java program to implement

hierarchical inheritance and demonstrate method overriding.

(b)  Explain abstract classes with a complete code example showing how abstract methods

 

 

10

 

 

K4

 

 

CO3

 

 

PO3


 

 

Q.No

 

QUESTIONS

 

MARKS

BT L

 

CO

 

PO

 

are enforced and implemented in derived classes.

 

 

 

 

 

 

 

 

13

(a)  Explain the concept of interfaces in Java along with the significance of default and

static methods.

(b)  Write a program demonstrating multiple inheritance using interfaces where a class implements two interfaces containing default methods and resolves potential method resolution ambiguities.

 

 

 

 

10

 

 

 

 

K4

 

 

 

 

CO3

 

 

 

 

PO3

UNIT-IV

 

1

What is a package? How do you define and import packages into Java programs?

 

2

 

K2

 

CO4

 

PO1

2

What is auto-boxing and auto-unboxing?

2

K1

CO4

PO1

 

3

Differentiate between checked and unchecked exceptions in Java.

 

2

 

K2

 

CO4

 

PO1

 

4

What is the purpose of try, catch, and finally blocks?

 

2

 

K2

 

CO4

 

PO1

 

5

What is the difference between Byte streams and Character streams in Java I/O?

 

2

 

K2

 

CO4

 

PO1

 

6

Explain the hierarchy of standard exception classes in Java and the role of the Throwable class.

 

5

 

K2

 

CO4

 

PO2


 

 

Q.No

 

QUESTIONS

 

MARKS

BT L

 

CO

 

PO

 

7

Discuss wrapper classes and explain the core utilities available in the java.lang package.

 

5

 

K2

 

CO4

 

PO2

 

8

Explain the use of throw and throws keywords in exception handling with proper context.

 

5

 

K3

 

CO4

 

PO2

 

9

Describe standard I/O streams and explain the utility of the Scanner class and files in Java.

 

5

 

K2

 

CO4

 

PO2

 

 

10

Detail the process of defining packages,

managing path and classpath, and exploring Java SE packages including java.util, formatters, and date/time packages.

 

 

10

 

 

K4

 

 

CO4

 

 

PO3

 

 

11

Provide a thorough explanation of exception handling mechanisms in Java, detailing

multiple catch clauses, standard exception

hierarchies, and file management using Java I/O APIs.

 

 

10

 

 

K4

 

 

CO4

 

 

PO3

 

 

 

12

(a)  Discuss the creation and handling of user-defined (custom) exceptions in Java with a

complete application code.

(b)  Explain exception propagation and the precise mechanics of using throw and throws keywords in checked exception handling.

 

 

 

10

 

 

 

K4

 

 

 

CO4

 

 

 

PO3

 

 

13

(a)  Explain the Java I/O stream hierarchy in detail, differentiating clearly between Byte streams and Character streams.

(b)  Write a Java program to read text from a source file using character streams, count

 

 

10

 

 

K4

 

 

CO4

 

 

PO3


 

 

Q.No

 

QUESTIONS

 

MARKS

BT L

 

CO

 

PO

 

lines, words, and characters, and write the report to a target file.

 

 

 

 

UNIT-V

 

1

What is the difference between the String and StringBuffer classes?

 

2

 

K2

 

CO5

 

PO1

 

2

What is a thread and what is the need for multithreaded programming on multi-core processors?

 

2

 

K2

 

CO5

 

PO1

 

3

List and briefly explain the various thread states in Java.

 

2

 

K1

 

CO5

 

PO1

 

4

What is JDBC architecture and what is the role of the ResultSet interface?

 

2

 

K2

 

CO5

 

PO1

 

5

What is JavaFX Scene Builder and how are mouse events handled?

 

2

 

K3

 

CO5

 

PO2

 

6

Explain the methods used for extracting characters, comparing, modifying, and

searching strings within the String class.

 

5

 

K2

 

CO5

 

PO2

 

7

Discuss thread priority, synchronization, and how deadlock and race situations occur in multithreaded programs.

 

5

 

K4

 

CO5

 

PO2

 

8

Explain the steps to set up the JDBC

environment, install MySQL Connector/J, and establish database connections.

 

5

 

K3

 

CO5

 

PO2


 

 

Q.No

 

QUESTIONS

 

MARKS

BT L

 

CO

 

PO

 

9

Describe the JavaFX application window

structure, scene graph layout, and how text and images are displayed.

 

5

 

K2

 

CO5

 

PO2

 

 

10

Explain multithreaded programming in depth, covering thread creation using the Thread

class, managing main thread, thread states, priorities, synchronization, and inter-thread communication.

 

 

10

 

 

K5

 

 

CO5

 

 

PO3

 

 

11

Discuss advanced Java features including

JDBC database connectivity architecture and JavaFX GUI development, detailing scene graphs, window structures, and event

handling.

 

 

10

 

 

K5

 

 

CO5

 

 

PO3

 

 

 

 

12

(a)  Compare and contrast String,

StringBuffer, and StringBuilder classes with respect to mutability, memory pooling, and performance.

(b)  Write a Java program using StringBuffer to perform various text manipulation tasks including custom insertions, deletions, and substring reversals.

 

 

 

 

10

 

 

 

 

K5

 

 

 

 

CO5

 

 

 

 

PO3

 

 

 

 

13

(a)  Explain inter-thread communication mechanisms in Java using wait(), notify(),

and notifyAll() methods through the classic Producer-Consumer problem.

(b)  Write a complete JDBC program to

establish a connection to a MySQL database, execute an SQL query, and process the

records using the ResultSet interface.

 

 

 

 

10

 

 

 

 

K5

 

 

 

 

CO5

 

 

 

 

PO3

 

No comments:

Blog Archive