0% found this document useful (0 votes)
8 views11 pages

Cs3361 Object Oriented Programming

The document is a question bank for the CS3361 - Object Oriented Programming course at SRM Valliammai Engineering College for the academic year 2025-2026. It includes questions categorized by units covering topics such as OOP concepts, inheritance, packages, interfaces, exception handling, and multithreading. The questions are structured to assess various levels of understanding and competencies in Java programming.

Uploaded by

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

Cs3361 Object Oriented Programming

The document is a question bank for the CS3361 - Object Oriented Programming course at SRM Valliammai Engineering College for the academic year 2025-2026. It includes questions categorized by units covering topics such as OOP concepts, inheritance, packages, interfaces, exception handling, and multithreading. The questions are structured to assess various levels of understanding and competencies in Java programming.

Uploaded by

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

SRM VALLIAMMAI ENGINEERING COLLEGE

(An Autonomous Institution)


SRM Nagar, Kattankulathur – 603 203

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

QUESTION BANK

III SEMESTER
CS3361 – OBJECT ORIENTED PROGRAMMING
Regulation – 2023

Academic Year 2025 – 2026(odd Semester)

Prepared by

Ms.R.Anitha, Assistant Professor (Sr.G)/CSE


Ms.R.Gayathri, Assistant Professor (O.G)/CSE
Ms.S.Balaswathy, Assistant Professor (O.G)/CSE

1
SRM VALLIAMMAI ENGINEERING COLLEGE
(An Autonomous Institution)
SRM Nagar, Kattankulathur – 603 203.

DEPARTMENT OF CSE & IT


QUESTION BANK
SUBJECT : CS3361 – OBJECT ORIENTED PROGRAMMING

SEM / YEAR: III SEM / II Year

UNIT I INTRODUCTION TO OOP AND JAVA


Overview of OOP – Object oriented programming paradigms – Features of Object Oriented
Programming – Java Buzzwords – Overview of Java – Data Types, Variables and Arrays – Operators
– Control Statements – Programming Structures in Java – Defining classes in Java – Constructors -
Methods -Access specifiers - Static members- Java Doc comments.
PART – A
Q.No Questions BT Level Competence

1. Define OOP. BTL1 Remembering


2. Define abstraction and encapsulation. BTL1 Remembering

3. List the features of Object Oriented Programming. BTL1 Remembering


4. Give the contents of Java Environment (JDK). BTL1 Remembering
5. Define Inheritance and Polymorphism. BTL1 Remembering
6. Write a variable in Java and print its value using a simple java program. BTL2 Understanding
7. List the various access specifiers supported by OOP. BTL1 Remembering

8. Define Constructors. BTL1 Remembering


9. Classify the steps for execution of a java program. BTL2 Understanding
10. Identify the three major sections of java source file. BTL2 Understanding
11. Classify the types of inheritance in java. BTL2 Understanding
12. Write a java program to print “Hello World”. BTL2 Understanding

13. Define static variable and static method. BTL1 Remembering


What is JVM and JIT? BTL2 Understanding
14.
List the various comments in Java Doc Comments. BTL1 Remembering
15.
Modify the following while loop into for loop
16.

2
int n=10;
int i=1;
while(n>5)
{
i=i*2; BTL2 Understanding
n=n+2;
}
System.out.println(i);

17 Outline integer data types in java. BTL2 Understanding


18 Differentiate break and continue statements. BTL2 Understanding
19 What are public static void main(String args[]) and System.out.println()? BTL2 Understanding
20 Differentiate while() and do..while() loop BTL2 Understanding

21 Is JVM’s platform independent? Justify. BTL2 Understanding


Assess the method to declare array and how to allocate the memory to
22 BTL1 Remembering
array.
Assess the error in the following array declaration and rectify them.
23
a. int a[]=new [10]int; BTL1 Remembering
float []b=new int[10.5];
24 Write a java program using control flow statements. BTL2 Understanding
PART - B
Analyze the various features of the Object Oriented Programming
1. BTL4
Language.(16) Analyzing
Define polymorphism. With an example, describe in detail about
2. BTL4 Analyzing
how polymorphism plays a useful role in Java.(16)
3. List the types of arrays in detail with example program.(16)
BTL4 Analyzing
4. What is meant by constructor? Discuss the types of constructor with BTL5
example. (16) Evaluating
With relevant examples describe abstraction and encapsulation. Write a BTL5
5. java program that uses an abstraction and encapsulation.(16) Evaluating
i) Illustrate the typical java program structure in detail.(8)
6. BTL3
ii) Summarize the general java program compilation and execution. (8) Applying
Discover the following:
7. i) Control flow statements in Java (8) BTL4 Analyzing
ii) Data types in Java (8)
Discuss in detail about the different control flow statements in Java with BTL5
8. example (16) Evaluating
Explain with the help of a program how object oriented
9. programming overcomes the shortcomings of procedure oriented BTL4 Analyzing
programming.(16)
10. i) Explain in detail the various operators in Java. (8) BTL3
ii) Examine the rules for variable declaration (8) Applying
Implement a program in Java that interchanges the odd and even BTL3
11. components in an array.(16) Applying
Write a Java program to sort set of names stored in an array in
BTL3
12. alphabetical order.(16) Applying
Explain in detail about static variable and static method in Java with
13. BTL4 Analyzing
3
example.(16)
14. Explain how two numbers can be swapped with and without temporary BTL4 Analyzing
variables. Write a java program for each(16)
15. Explain the characteristics of OOPs.(16) BTL4 Analyzing
16. Consider the following series of number:
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, etc.
BTL5 Evaluating
Write a Java program to print the above series by getting the numbers of
values to be printed from the user (16)
17. Write the techniques to design classes in Java using JavaDoc. (16) BTL3 Applying

UNITII INHERITANCE, PACKAGES AND INTERFACES


Overloading Methods – Objects as Parameters – Returning Objects –Static, Nested and Inner Classes.
Inheritance: Basics– Types of Inheritance -Super keyword -Method Overriding –Abstract Classes –
final with Inheritance. Packages and Interfaces: Packages – Packages and Member Access –Importing
Packages – Interfaces.
PART - A
Q.No Questions BT Level Competence

1. Define abstract class. BTL1 Remembering


2. What is the use of Inheritance and what are its advantages? BTL1 Remembering

3. List the methods provided by the object class. BTL1 Remembering


4. Tell how interfaces can be extended. BTL1 Remembering
5. Define Interface. BTL1 Remembering
6. List the order of execution of constructor during creation of class BTL1
hierarchy? Remembering
7. How can you access the super class version of an overridden method? BTL2 Understanding
How?
8. Do you declare private and protected modifiers for variables in BTL2 Understanding
interfaces? Justify
9. Infer how to access interface variables. BTL2 Understanding
10. What is the use of‘ static keyword. BTL2 Understanding
11. List down the uses of final classes BTL2 Understanding
12. Whether a subclass can access all members of super class? How? BTL1 Remembering

13. Can we instantiate an abstract class? Justify BTL2 Understanding


Define final and finalize.
14. BTL1 Remembering
When to use final variable and method?
15. BTL1 Remembering
Compare superclass and subclass. BTL2 Understanding
16.
17. Distinguish between classes and interface. BTL2 Understanding
18 Examine the effect if an abstract class is private. BTL2 Understanding
19 Does java support multiple inheritance? BTL2 Understanding
20 Does a class implement more than one interface? Write an example for BTL2 Understanding
it.
21 What's the difference between an interface and an abstract class?
BTL1 Remembering
4
How to make a statement execute before the main method is invoked by JVM? BTL2 Understanding
22
How to create an inner class? BTL2 Understanding
23
24 Write a simple program to implement abstract class. BTL2 Understanding
PART – B
Define Inheritance? With diagrammatic illustration and
1. BTL3 Applying
java programs illustrate the different types of inheritance.(16)
Define multiple inheritance and how to perform multiple inheritance in BTL3
2. Applying
Java.(16)
Describe Abstract classes with an example program. Also describe
BTL5 Evaluating
3. the properties of abstract classes.(16)
4. Describe interfaces & how to implement it with a Java Program?(16)
BTL5 Evaluating
Explain the concepts of Overloading and method overriding with an
example.(16) BTL5 Evaluating
5.
Illustrate the about inner classes and its types with examples.(16) BTL3
6. Applying
Summarize the concept of super classes and sub classes.(16) BTL4
7. Analyzing
Explain final methods, variables and classes with sample program.(16)
8. BTL5 Evaluating
Explain how to define an interface? Why do the members of interface
BTL5 Evaluating
9. are static and final?(16)
10. Explain extending interfaces with a Program & Variables
BTL5 Evaluating
in a
Program.(16)
Examine the methods used in object class with illustrative Program.
11. BTL3 Applying
How can we overload the constructor? Explain by using multilevel
BTL4 Analyzing
12. inheritance(16)
How to use the super keyword to invoke a superclass's variable,
13. constructor and methods. Illustrate with example program. (16) BTL4 Analyzing
14. i. Is it possible to call a sub class constructor from super class constructor?
Justify with example program (8)
ii. Can we have this and super in the same constructor? Justify with BTL4
example program(8) Analyzing
15. How many interfaces can a class inherit and can a same interface BTL5
be inherited by 2 different classes? Explain it.(16) Evaluating
16. Can you give a detailed sketch of the differences between Single, BTL5 Evaluating
Multilevel & Hierarchical Inheritance? .(16)
17. Declare an abstract class to represent a bank account with data members
name, account number, address and abstract methods withdraw and
deposit. Method display() is needed to show balance. Derive a subclass
Savings Account and add the following details: return on investment BTL6 Creating
and the method calcAmt() to show the amount in the account after 1
year.Create instance of Savings Account and show the use of withdraw
and deposit abstract methods.(16)

5
UNIT - III: EXCEPTION HANDLING AND MULTITHREADING

Exception Handling basics – Multiple catch Clauses – Nested try Statements – Java’s Built-in
Exceptions – User defined Exception. Multithreaded Programming: Java Thread Model–Creating a
Thread and Multiple Threads – Priorities – Synchronization – Inter Thread Communication-Suspending
–Resuming, and Stopping Threads –Multithreading.
PART - A
Q.No Questions BT Level Competence

1. Define Exception. BTL1 Remembering


2. State the general form of an exception handling block. BTL1 Remembering

3. What are the various segments of an exception handling mechanism? BTL2 Understanding
4. Give the advantages of using exception handling mechanism. BTL2 Understanding

5. Define the two types of exception. Explain them. BTL2 Understanding


6. How can you access the class if it is declared without any access BTL3 Applying
modifiers?
7. Show what is the purpose of the finally clause of a try-catch-finally
statement? BTL3 Applying
8. Why java generates unreachable code error during multiple catch
BTL5 Evaluating
statements?
9. Can an exception be rethrown? How? BTL5 Evaluating
What happens if an exception are not provided by the user? BTL6 Creating
10.
11. Define Throwable Class. BTL1 Remembering

12. Difference Between exception and error. BTL2 Understanding

13. What is Exception handling? BTL1 Remembering


Illustrate the life cycle of thread BTL 3 Applying
14.
What do you mean by threads in Java ? BTL1 Remembering
15.
"Thread is a lightweight process" - Discuss BTL2 Understanding
16.
17. What are the three ways by which the thread can enter in waiting stage? BTL1 Remembering
18 Can we have empty catch block? Show it with an example. BTL 3 Applying
19 Why do we need run() and start() method both? Can we achieve it with BTL4 Analyzing
only run() method? Analyze it.
20 Explain the two ways of creating a thread? BTL4 Analyzing
21 Differentiate between process and thread. BTL4 Analyzing
Point out what do you mean by synchronization ? BTL4 Analyzing
22
What are different stages in thread? Summarize it. BTL5 Evaluating
23
24 There are three statements in a try block - statement1, statement2 and
statement3. After that there is a catch block to catch the exceptions
BTL6 Creating
occurred in the try block. Assume that exception has occurred in
statement2. Does statement3 get executed or not? Formulate it.
PART - B

6
Define exception. Why it is needed? Explain the different types of
1. exceptions and the exception hierarchy with appropriate examples BTL1 Remembering
using Java.(16)
Explain the use of try-catch clauses by sample statements of rare type of
2. run time error. (16) BTL2 Understanding
How exceptions are handled in Java? Explain the important methods
BTL3 Applying
3. used to handle exception.(16)
4. Describe the following concepts with example
i. Try-catch-throw paradigm. (8) BTL3 Applying
ii. Exception specification. (8)
Discuss in detail about exception handling constructs and write a
program to illustrate Divide by zero exception.(16) BTL4 Analyzing
5.
Evaluate a try block that is likely to generate three types of exception
6. and then incorporate necessary catch blocks and handle
BTL5 Evaluating
them appropriately.(16)
Draw an exception hierarchy in java and explain with examples
7. throwing and catching exceptions and common exceptions. (16) BTL6 Creating
Explain in detail about Java’s Built-in Exceptions. Explain any three BTL4 Analyzing
8. Exceptions.
What is java exception? How java exception handling is managed?
9. Outline. (8)
BTL5 Evaluating
Outline java checked exceptions defined in java.lang.package. (8)
10. With illustrations explain multithreading, interrupting threads, thread states
and thread properties.(16) BTL3 Applying
Describe the life cycle of thread and various thread methods.(16)
11. BTL2 Understanding
Explain the thread creation method in detail.(16)
Analyzing
12. BTL4
How do you create multiple threads with an example.(16)
13. BTL1 Remembering
14. Summarize the inter thread communication with a suitable example.(16) BTL5 Evaluating
15. Express the creation of a thread using runnable interface.(16)
BTL2 Understanding
16. Describe about the thread priorities in detail.(16)
BTL1 Remembering
17. Identify the thread creation method by extending thread class.(16)
BTL1 Remembering
UNIT IV - I/O, GENERICS, STRING HANDLING
I/O Basics – Reading and Writing Console I/O – Reading and Writing Files. Generics: Generic
Programming – Generic classes – Generic Methods – Bounded Types – Restrictions and Limitations.
Strings: Basic String class, methods and String Buffer Class.
PART - A
Q.No Questions BT Level Competence

1. Define Java I/O basics. BTL1 Remembering


2. What are streams? BTL1 Remembering
3. List the byte stream classes. BTL1 Remembering
4. What is absolute file name? BTL1 Remembering
7
5. What is relative file name? BTL1 Remembering
6. Describe the use of seek method. BTL1 Remembering
7. Express a Java code to check if the command line argument is file or BTL2 Understanding
not.
8. Discuss the two common constructors of FileInputStream. BTL2 Understanding
9. Summarize the use of Input Stream Reader and Output Stream Writer? BTL2 Understanding
10. Give an example for reading data from files using FileInputStream BTL2 Understanding
11. Illustrate why generic programming is required? BTL3 Applying
12. Show an example of a generic class. BTL3 Applying
13. Examine can generic be used with inheritance in several ways? What BTL3 Applying
are they?
Pointout any two advantages of type parameters. BTL4 Analyzing
14.

15. Explain any two challenges of generic programming in virtual BTL4 Analyzing
machine.
Analyze the operations on String handling.
16. BTL4 Analyzing
Discriminate between the capacity and length function of String
17. Buffer class using java program. BTL5 Evaluating

18. Explain using a simple Java program to check the palindrome of the BTL5 Evaluating
given string.
19. Generalize in detail about bounded types with suitable example BTL6 Creating
20. Prepare an example program in Java on how to implement bounded BTL6 Creating
types
21. Express the Restrictions and Limitations of generic type. BTL2 Understanding
22. Illustrate a Java program to read entire line through keyboard. BTL3 Applying
23. Differentiate Byte Streams and Character Streams classes. BTL4 Analyzing
24. Compare string and StringBuffer class. BTL5 Evaluating
PART - B
Write a program to count the total no. of chars, words, lines, BTL1 Remembering
1.
alphabets, digits, white spaces in a given file.(16)
Write a program that copies the content of one file to another BTL1 Remembering
2. file.(16)
Describe in detail about FileInputStream and FileOutputStream with
3. an example.(16) BTL1 Remembering
4. (i) Define generic programming and explain with an example about
generic classes.(8) BTL1 Remembering
(ii) Write in detail about generic functions with an example.(8)
(i) Discuss a program to read from a file using BufferedReader
5. class.(8) BTL2 Understanding
(ii) Discuss a program to read from a file using FileWriter class.(8)

8
(i)Summarize in detail about String and String constructor.(8)
6. (ii)Discuss in detail about String handling functions.(8) BTL2 Understanding
Give the complete functionality of StringBuffer class with an
7. example.(16) BTL2 Understanding
Show an example of String Comparison function.(16) BTL3 Applying
8.
Discover how do you invoke and instantiate a generic type and why
9. generics is used with an example.(16) BTL3 Applying
10. Explain in detail about reading console input with an example.(16) BTL4 Analyzing

Analyze how Generics Improve Type Safety with an example.(16) BTL4 Analyzing
11.
Infer a Java program to insert a string "FRIEND" in the given string BTL4 Analyzing
12. " --- in need is a indeed".(16)
(i)Explain java program to count vowels and consonants in a BTL5 Evaluating
13. String.(8)
(ii)Explain java Program to find number of elements in an array.(8)
14. Design string sorting using bubble sort.(16) BTL6 Creating
15. Summarize the concept of streams and stream classes and their
classification.(16) BTL2 Understanding
16. While reading a file how would you check whether you have reached
the end of the file.(16) BTL3 Applying
17. Illustrate in brief about BTL5 Evaluating
i. Reading from a file. (8)
ii. Writing in a file. (8)

UNIT V - JAVAFX EVENT HANDLING, CONTROLS AND


COMPONENTS
AWT vs Swing Components – JAVAFX Events and Controls: Event Basics – Handling Key and Mouse
Events. Controls: Checkbox, ToggleButton – RadioButtons –ListView – ComboBox – ChoiceBox – Text
Controls – ScrollPane. Layouts –FlowPane – HBox and VBox – BorderPane – StackPane – GridPane.
Menus –Basics – Menu – Menu bars –MenuItem.
PART – A
Q.No Questions BT Level Competence
1. What is JavaFX ? BTL1 Remembering
2. What are various features of JavaFX ? BTL1 Remembering
3. Is Javafx Open Source ? BTL1 Remembering
4. What are the main components of JavaFX application? BTL1 Remembering
5. Which method is used to launch JavaFX application? BTL1 Remembering
6. What is FlowPane? BTL1 Remembering
7. Explain the terms - Stage and scene used in JavaFX application. BTL2 Understanding

8. What is the use of pane in JavaFX application? BTL2 Understanding


9. What is property binding in JavaFX ? BTL2 Understanding
10. What is Event? BTL2 Understanding
11. What is event source object? BTL3 Applying
12. Explain the terms - event handler and event listener. BTL3 Applying
13. Explain the event methods in JavaFX that are associated with BTL3 Applying
keyboard.

9
14. Explain any two UI controls used in JavaFX application. BTL4 Analyzing
15. Analyze the terms “ListView, ComboBox and ChoiceBox” BTL4 Analyzing
16. Enlist various layout panes used in any JavaFX application? Analyzing
BTL4
17. Explain the terms - Menubar and Menu item. BTL5 Evaluating

18. Discriminate Menubar and Menuitem. BTL5 Evaluating


19. Generalize the term StackPane. BTL6 Creating
20. Develop the ScrollPane. BTL6 Creating
21. Define TextControl. BTL2 Understanding
22. Design GridPane. BTL3 Applying
23. Differentiate HBox and VBox. BTL4 Analyzing
24. Summarize the various terms Checkbox, ToggleButton and BTL5 Evaluating
RadioButtons
PART-B
1. Describe Event basics in detail.(16) BTL1 Remembering
2. Examine in detail about handling mouse events.(16) BTL1 Remembering
3. Identify with an example about handling Key events.(16) BTL1 Remembering
4. Describe the way of Handling events in detail.(16) BTL1 Remembering
5. Give the controls in JAVA AWT? Express any two of them in
detail.(16) BTL2 Understanding
6. Discuss in detail about the different layouts in JAVA AWT?(16) BTL2 Understanding
7. Interpret the controls Checkbox, ToggleButton and RadioButton
with an example. BTL2 Understanding
8. Explain about Border Pane and Flow Pane with an example.(16)
BTL3 Applying
9. Illustrate in detail about the following: BTL3 Applying
(i)Menu(4)
(ii)Menubars(6)
(iii) Menuitem (6)
10. Analyze the following controls: BTL4 Analyzing
(i)ComboBox (8)
(ii)ChoiceBox (8)
11. Explain the following: BTL4 Analyzing
(i) TextControls (8)
(ii) Scrollpane with an example(8)
12. Differentiate HBox and VBox. with suitable example. BTL4 Analyzing
13. Summarize the term StackPane with an example.(16) BTL5 Evaluating
14. Design a GridPane with an example.(16) BTL6 Creating
15. Discuss in detail about AWT Components.(16) BTL2 Understanding
16. Illustrate the Swing Components in detail.(16) BTL3 Applying
17. Summarize all types of menus in detail with an example.(16) BTL5 Evaluating

10
11

You might also like