Java Programming QB U - 1,2&3
Java Programming QB U - 1,2&3
Course Question
Q.No Question Marks Section Unit
Outcome Level
a) Define OOP and explain the concepts of
1) OOPs. CO1 Easy 8 Section-I 1
b) Explain java features.
What is an operator? Explain various types of
2) operators available in Java with an example code CO1 Easy 8 Section-I 1
for each.
Explain the following with suitable examples,
(i) simple if statement
3) (ii) if- else statement CO1 Medium 8 Section-I 1
(iii) if-else-if statement
(iv) switch statement
a) Illustrate the Iteration Statements in java
with suitable examples.
4) CO1 Medium 8 Section-I 1
b) Write a program to illustrate the sum of “n”
natural numbers using for loop statement.
a) Write short notes on break, continue
statements with examples.
5) b) Write a java program to Illustrate how the CO1 Medium 8 Section-I 1
break statement alters control flow within
the loop?
a) Explain array concept using Java.
6) b) Write a java program to sort an array of CO1 Complex 8 Section-I 1
strings.
What is a Constructor? Explain various types of
7) CO1 Medium 8 Section-I 1
Constructors in detail with a suitable example.
What is Method Overloading? Write a java
8) CO1 Complex 8 Section-I 1
program to illustrate “Method Overloading”.
a) Explain in detail about recursion in java?
9) b) Write a program to implement the factorial CO1 Medium 8 Section-I 1
of a number using recursion in java.
What is garbage collection? Explain how to call the
10) CO1 Easy 8 Section-I 1
garbage collector explicitly in java.
a) What is inheritance in object-oriented
Section-
11) programming? Discuss its significance. CO2 Easy 8 2
II
b) Define i. Class, ii. Superclass, iii. Subclass,
iv. Reusability and write the benefits of
inheritance?
Define inheritance and explain the different types
Section-
12) of inheritance (single, multilevel, hierarchical) with CO2 Medium 8 2
II
example programs?
Write a java code to create a chain of new classes
Section-
13) that inherits from their previous classes (Multilevel CO2 Complex 8 2
II
inheritance), adding specific functionalities.
Explain the usage of the super keyword in
inheritance, elucidating its role in facilitating access Section-
14) CO2 Medium 8 2
to superclass members and constructors from II
subclass contexts.
Discuss the concept of preventing inheritance in
Section-
15) Java programming, focusing on its significance, CO2 Medium 8 2
II
mechanisms, and potential use cases.
With a suitable example programs, discuss the
16) importance of final variable, final method and final
class to prevent inheritance in Java?
Explain the concept of compile time polymorphism
Section-
17) (method overloading). Elaborate its types with CO2 Complex 8 2
II
illustrative examples and discuss its advantages.
a. Define the concept of run time
polymorphism (method overriding).
Section-
18) b. Write a java program to get interests from CO2 Medium 8 2
II
different banks using the Hierarchical
inheritance and run time polymorphism.
Discuss the role of abstract classes and methods in Section-
19) CO2 Medium 8 2
achieving polymorphism, with an example code. II
20) Write a java program for Abstract class having Section-
CO2 Medium 8 2
18 Constructor, Data Member and Methods? II
a. List the difference between an abstract class
and an interface.
Easy, Section-
21) b. Write a Java program to find the square and CO3 8 3
Medium III
cube of a given number using hierarchical
inheritance.
Define interface? Explain the implementation of an Section-
22) CO3 Medium 8 3
interface in Java with an example. III
Explain the relationship between classes and Section-
23) interfaces with an example of implementing CO3 Medium 8 III 3
interfaces with different classes.
Briefly explain Java Accessing Implementations Section-
24) through Interface References with an example of CO3 Medium 8 III 3
extending interface-interface inheritance.
Define multiple inheritance in Java by interacting Section-
25) CO3 Easy 8 3
with program code. III
Explain the Java Nested Interface with an example Section-
26) of a nested interface that is declared within the CO3 Complex 8 III 3
class.
Define Java Default Methods? Mention the Section-
27) different types of inner classes and explain anyone CO3 Easy 8 III 3
with an example.
a. What is a Java package? Explain the types of
packages in detail.
Easy, Section-
28) b. Define user-defined packages. With a suitable CO3 8 3
Medium III
example.