Java

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 30

SOCSE

Question Bank - Unit no.: 1


Program: B.Tech
Course Name: Object Oriented Programming Course Code: 21BTCS301
Academic year: 2022-23 Sem/Year: III/II
Level A. Easy Questions (2 marks each)
S. No. Questions CO*
Q1 Define OOM in detail. CO1

Q2 Define Class and object. CO1,CO2

Q3 Enunciate the term Encapsulation with example CO1,CO2

Q4 Illustrate the use of OOPS concept? CO1

Q5 Define Inheritance with example. CO1

Q6 Enunciate Polymorphism. Explain with example. CO1

Q7 Explain the Basic program structure of Java. CO1

Q8 Explain why there is need of abstraction in java? CO1

Q9 Why java is known as platform-neutral language? CO1

Q10 Explain class variables and Methods? CO1

Q11 What is class? How does it accomplish data hiding? CO2

Q12 Why do we need the import Statement? CO1,CO2

Q13 What are objects? How are they created from a class? CO1,CO2

Q14 Define Else-If Ladder with example CO2

Q15 Why JAVA is called as pure OOPS? CO2

Q16 Describe the arithmetic operators and assignment operators in JAVA CO1,CO2

Q17 Enunciate Multiple Inheritance. How we can implement Multiple Inheritance in CO1
Java?
Q18 What is Platform independence? CO1

Q19 What is JRE? Explain in detail CO1,CO2

Q20 Define 2 methods for string concatenation with examples. CO1


Level B. Intermediate Questions (5 marks each)
Q21 Differentiate between Method Overriding and Method Overloading. CO1

Q22 Justify the Byte Code? Discriminate states of Java Program execution? CO1,CO2

Q23 Define a Class, Method and Object? Write the syntax to define these in CO1,CO2
java.
Q24 What is difference between packages and interfaces explain with example? CO1,CO2
Q25 Explain different data types using in java? CO1

Q26 Difference between while and do-While loop. CO3,CO4

Q27 Write a program, which will read a string and rewrite it in the alphabetical CO2, CO3
order.
Q28 Enunciate Wrapper classes in detail. Explain with example. CO2

Q29 Elaborate Strings. Illustrate various String manipulation functions. CO2, CO3

Q30 Differentiate between Applets and Java Applications CO2

Level C. Difficult Questions (10 marks each)

Q31 List out at least 10 differences between C++ and JAVA. CO2, CO3

Q32 Explain various features of JAVA in detail. CO2, CO3

Q33 Define an Operator? Explain type of operators in Java with examples. CO2, CO3

Q34 Write a program for finding factorial of a number using user's input. CO3,CO4

Q35 Write a program to implement at least 5 String manipulation functions. CO3,CO4

Q36 1. Write a program to print the largest element in an array CO4,CO5


2. Write a program to print the sum of all the items of the array.

** Note: Students to be instructed to draw well labeled diagrams wherever necessary,


to support their answers (especially in level B and C questions)

Question Bank - Unit no.: 2


Program: B.Tech
Course Name: Object Oriented Programming Course Code: 21BCA101
Academic year: 2022-23 Sem/Year: III/II
Level A. Easy Questions (2 marks each)
S. No. Questions CO*
Q1 Define class and object. CO1

Q2 Explain Encapsulation with example. CO1,CO2

Q3 Define Inheritance with example. CO1,CO2

Q4 What is polymorphism? Explain with example. CO1

Q5 Explain aggregation. CO1

Q6 Explain Interface with example. CO1

Q7 Give an example of multiple inheritance. CO1

Q8 Why the need of abstraction in java? CO1

Q9 Discuss generalization and inheritance. CO1,CO2

Q10 What is class? Explain class variables and Methods? CO1

Q11 What is type casting? How is it done in Java? CO2

Q12 Why we use Super in java? CO1,CO2

Q13 What is visibility controls? CO1,CO2

Q14 Differentiate between public, private and protected access specifiers. CO2

Q15 Explain the working of Abstract Classes with example. CO2

Q16 Write a short note on Chain Printers. Explain with proper diagram. CO1,CO2

Q17 Explain the working of Destructors in JAVA. CO1,CO2

Q18 Write a short note on Inner class and Nested class. CO1

Q19 Enunciate 'new', 'this' and 'super' keyword in JAVA. CO1

Q20 Differentiate between LCD and LED monitors. CO2

Level B. Intermediate Questions (5 marks each)


Q21 What is an abstract class? Explain all the cases to implement abstract CO1
class.
Q22 What is multiplicity in associations? Give example to explain multiplicity. CO1,CO2

Q23 Define is a Data Type? Give the declaration of variable in Java. Write the CO1,CO2

Rules.

Q24 Explain the Control Statements in Java with example. CO1,CO2

Q25 Compare and contrast overloading and overriding methods? CO1

Q26 Elaborate the role of constructor. What are its special properties? CO3,CO4
Q27 What are objects? How are they created from a class? CO2, CO3

Q28 Differentiate between Abstract classes and Interfaces. CO2

Q29 Differentiate between “access specifiers” & “non-access specifiers” in CO2, CO3
Java.
Q30 How concept of Multiple inheritance can accomplish in JAVA explain with CO2
example.
Level C. Difficult Questions (10 marks each)

Q31 Describe command line arguments? Write a Program to add two numbers CO2, CO3
using command line arguments.
Q32 What are operators? Explain bitwise and special operator with example?. CO2, CO3

Q33 Enunciate the term Inheritance? Explain various types of inheritance with CO2, CO3
example of each.
Q34 Explain following with the help of an individual Java program: CO3,CO4
• “new” keyword
• “static” keyword
• “this”
Q35 Writ a program to implement Multiple and Multi-level Inheritance. CO3,CO4

Q36 Elaborate completely the concept of classes and objects with programming CO4,CO5
example.

** Note: Students to be instructed to draw well labeled diagrams wherever necessary,


to support their answers (especially in level B and C questions)

Question Bank - Unit no.: 3


Program: BCA
Course Name: Fundamental of Computer and Elements of IT Course Code: 21BCA101
Academic year: 2022-23 Sem/Year: I/I
Level A. Easy Questions (2 marks each)
S. Questions CO*
No.
Q1 What is the purpose of 'Throw' and ' Throws' keywords. CO1

Q2 What is Synchronization? CO1,CO


2
Q3 Explain the concept of Runnable Interface. CO1,CO
2
Q4 How can you handle an Exception. CO1

Q5 Elaborate the concept of Exception handling. CO1

Q6 How can you catch multiple exceptions. CO1

Q7 How do we invoke constructor? CO1,CO


2
Q8 What is inter-thread communication? CO1

Q9 Define throwable class in detail. CO1

Q1 What do you mean by final variable and final method? CO1


0
Q1 State the different access specifiers available in Java CO2
1
Q1 Write a note on finalizer method. CO1,CO
2 2
Q1 What are called members? CO1
3
Q1 Why it is considered as a good practice to define a constructor though compiler can CO1,CO
4 automatically generate a constructor ? 2
Q1 Write down the importance of destructor. CO2
5
Q1 Mention the differences between constructor and destructor CO1,CO
6 2
Q1 Draw the inheritance hierarchy for the frame and component classes in AWT and CO1,CO
7 Swing. 2
Q1 What are the advantages of using swing over awt? CO1
8
Q1 How do achieve special fonts for your text? Give example. CO1
9
Q2 Enlist atleast 4 differences between constructors and java method. CO2
0
Level B. Intermediate Questions (5 marks each)
Q2 Explain Types of error and exception classes. CO1
1
Q2 What is difference between packages and interfaces explain with example? CO1,CO
2 2
Table 02 [optional]
Q2 Explain Life cycle of thread and thread priority? CO1,CO
3 2

Q2 What are the types of exceptions in Java API? Explain each in detail. CO1,CO
4 2
Q2 Explain the use of try, catch, finally, throw and throws with example? CO1
5
Q2 What is multiple inheritance and how to perform it in Java? CO3,CO
6 done 4
Q2 Explain the fundamentals of Exception Handling and the exception types. CO2,
7 CO3
Q2 Give a detailed sketch of the differences between Single, Multilevel &Hierarchical CO2
8 Inheritance?
1. Single Inheritance:

 Definition:
 Single Inheritance involves a child class inheriting from only
one parent class.
 Each class can have at most one direct superclass.

2. Hierarchical Inheritance:

 Definition:
 Hierarchical Inheritance involves multiple classes inheriting
from a single superclass.
 It forms a tree-like structure with a common base class and
multiple derived classes.
3. Multilevel Inheritance:

 Definition:
 Multilevel Inheritance involves a chain of inheritance, where a
class serves as a superclass for another class, and that
subclass becomes the superclass for another class, forming a
chain.
Q2 Define two ways to create Threads. CO2,
9 done CO3
Q3 Describe how to set the priority to threads? What are the different ranges. CO2
0
Level C. Difficult Questions (10 marks each)

Q3 What is Multithreading? Illustrate the ways to create multiple threads in java. CO2,
1 CO3
Q3 Elaborate the concept of Threads. Explain thread life cycle in detail. CO2,
2 Threads are the smallest units of execution within a process. They enable concurrent CO3
execution of tasks, allowing different parts of a program to run in parallel. Each thread has
its own program counter, register set, and stack but shares the same memory space with
other threads in the same process. Threads are widely used in modern programming to
improve the performance and responsiveness of applications.
Q3 Write a java program to create two threads and execute simultaneously. CO2,
3 CO3
Q3 Write a Java program that creates three threads. First thread displays ― Good CO3,CO
4 Morning ǁ every one second, the second thread displays Hello ǁ every two seconds. 4
Q3 What is multithreaded programming? How we create thread and explain its life cycle? CO3,CO
5 4
Multithreaded programming is a programming paradigm where a process is divided into
two or more threads, and each thread can execute independently, concurrently, and
asynchronously. A thread is the smallest unit of execution within a process, and a process
can have multiple threads running concurrently.

In a multithreaded program, each thread represents an independent flow of execution.


These threads share the same resources, such as memory space and file descriptors, but
they have their own program counter, register set, and stack space. The concurrent
execution of threads allows for better utilization of the available resources and can lead to
improved performance, responsiveness, and efficiency in certain types of applications.

Q3 Describe interfaces & how to implement them with a Java CO4,CO


6 5
** Note: Students to be instructed to draw well labeled diagrams wherever necessary,
to support their answers (especially in level B and C questions)

Question Bank - Unit no.: 4


Program: BCA
Course Name: Fundamental of Computer and Elements of IT Course Code: 21BCA101
Academic year: 2022-23 Sem/Year: I/I
Level A. Easy Questions (2 marks each)
S. No. Questions CO*
Q1 How the exceptions are handled in Java? CO1

Q2 What is the difference between error and exception in Java? CO1

Q3 What is the difference between error and exception in Java? CO1

Q4 Can we write only try block without catch and finally blocks? CO1,CO2

Q5 No. Once a try block throws an exception, remaining statements will not CO1
be executed. control comes directly to catch block.
Q6 What is unreachable catch block error? CO1,CO2

Q7 What is OutOfMemoryError in Java? CO1,CO2

Q8 Does finally block get executed If either try or catch blocks are returning CO1
the control?
Q9 How can you identify the process? CO1

Q10 What is Multithreading and How it is Different from Multitasking? CO1

Q11 What is a thread? CO2

Q12 What are the different states of a thread, or what is thread lifecycle? CO1,CO2

Q13 What is the task of the main thread? CO1

Q14 What are Different Types of threads in Java? CO1

Q15 What is Daemon Thread in Java and explain their properties? CO2
Q16 Give the abbreviation of AWT? CO1,CO2

A. Applet Windowing Toolkit


B. Abstract Windowing Toolkit
C. Absolute Windowing Toolkit
D. None of the above

Q17 Which is a component in AWT that can contain other components like CO1,CO2
buttons, text fields, labels etc.?

A. Window
B. Container
C. Panel
D. Frame

Q18 In which places can put the event handling CO1


code A. Same class B. Other class
C. Anonymous class
D. All mentioned above

Q19 Which package provides many event classes and Listener interfaces for CO1
event handling?
A. java.awt
B. java.awt.Graphics
C. java.awt.event
D. None of the above

Q20 AWT is used for GUI programming in java? A. True B. False CO2

Level B. Intermediate Questions (5 marks each)


Q21 What is a thread? what is thread lifecycle. CO1

Q22 Explain the different states of a thread? CO1,CO2

Q23 Explain exception handling mechanism in Java? CO1,CO2

Q24 Write about Fileinputstream&Fileoutputstream CO1,CO2

Q25 What Is The Lifecycle Of An Applet? CO1

Q26 What are the methods under WindowListener Interface? CO3,CO4

Q27 What Are The Differences Between Swing And Awt? CO2, CO3
Q28 What's Java Swing? What do you understand by Event and Event Handler CO2
In Swing?
Q29 Explain event handling with examples. CO2, CO3

Q30 What are the different states of a thread, or what is thread lifecycle? CO2

Level C. Difficult Questions (10 marks each)


Q31 Explain applet life cycle with a suitable diagram. CO2, CO3

Q32 Enlist any four built in packages in java API with at least two class names CO2, CO3
from each package.
Q33 Differentiate between Applet and Application CO2, CO3

Q34 What Are Types of Applets? Discuss The Lifecycle Of An Applet. CO3,CO4

Q35 What is the use of Window Listener? Discuss. CO3,CO4

Q36 How are the elements of different layouts organized? CO4,CO5

** Note: Students to be instructed to draw well labeled diagrams wherever necessary,


to support their answers (especially in level B and C questions)

Question Bank - Unit no.: 5


Program: BCA
Course Name: Fundamental of Computer and Elements of IT Course Code: 21BCA101
Academic year: 2022-23 Sem/Year: I/I
Level A. Easy Questions (2 marks each)
S. No. Questions CO*
Q1 Define Operating System with the help of a labeled diagram. CO1

Q2 Explain the need for Computer Networks and its advantages. CO1

Q3 Illustrate Communication system. Define its basic elements. CO1

Q4 Explain data transmission services. CO1,CO2

Q5 Elaborate Time Division Multiplexing. CO1


Q6 Define the term Communication Protocol. CO1,CO2

Q7 Explain how Twisted-pair wired media works? CO1,CO2

Q8 Define Frequency division multiplexing. CO1

Q9 Explain the working of Coaxial Cable CO1

Q10 What are Switching Techniques? CO1

Q11 Explain the working of Router and Gateways. CO2

Q12 What are Distributed computer systems? CO1,CO2

Q13 Define the term Electronic Mail. CO1

Q14 What are the uses of Internet? CO1

Q15 What are the basic services of the Internet? CO2

Q16 Define what is Audio medias. CO1,CO2

Q17 Elaborate the working of Packet switching technique. CO1,CO2

Q18 Define what is Video medias. CO1

Q19 Enunciate Telnet and FTP. CO1

Q20 Explain Bus Topology in detail. CO2

Level B. Intermediate Questions (5 marks each)


Q21 Compare between LAN, MAN & WAN network. CO1

Q22 Differentiate between Ring Topology and Start Topology CO1,CO2

Q23 Differentiate between Analog and Digital Transmission CO1,CO2

Q24 What is communication media in Networking? List two physical CO1,CO2


communication media
Q25 Define Synchronous and Asynchronous Transmission CO1

Q26 Explain Data Transmission. Define all Data Transmission Models CO3,CO4

Q27 Differentiate between Analog and Digital transmission. CO2, CO3

Q28 Define Multimedia. Enlist various multimedia applications. CO2

Q29 Differentiate between FDM and TDM. CO2, CO3

Q30 Explain Client-Server computing in detail. CO2

Level C. Difficult Questions (10 marks each)


Q31 What is Network Topology? Explain the different types of topologies in CO3, CO4
detail with examples.
Q32 Write five differences between each of the following: a) CO2, CO3
Router and Gateway
b) Ring topology and Star topology
Q33 What do you understand by computer network? Explain the different types CO2, CO3
of computer network
Q34 Describe the term Physical Communication Media. Explain its types in CO3,CO4

detail with proper diagram.

Q35 Enunciate Modulation. Explain all the modulation techniques in detail CO3,CO4

Q36 Define Multiplexing. Explain the types of Multiplexing CO4,CO5

** Note: Students to be instructed to draw well labeled diagrams wherever necessary,


to support their answers (especially in level B and C questions)

You might also like