0% found this document useful (0 votes)
4 views

OOP LAB EXTERNAL

Uploaded by

manda.ashok
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

OOP LAB EXTERNAL

Uploaded by

manda.ashok
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

II-I-B.TECH OOPS LAB EXTERNAL

BRANCH:CSE DATE:

1. (a) Write a Java program to display the default value of all primitive data types in Java.
(b) Write a Java program that displays the roots of a quadratic equation . Calculate the discriminant
and, based on the value of , describe the nature of the roots.

2. (a) Write a Java program to search for an element in a given list of elements using the Binary
Search mechanism.
(b) Write a Java program to sort a given list of elements using the Bubble Sort technique.
(c) Write a Java program using StringBuffer to delete and remove characters.

3. (a) Write a Java program to implement the class mechanism. Create a class, define methods, and
invoke them inside the main method.
(b) Write a Java program to implement Method Overloading.
(c) Write a Java program to implement Constructors.
(d) Write a Java program to implement Constructor Overloading.

4. (a) Write a Java program to implement Single Inheritance.


(b) Write a Java program to implement Multi-Level Inheritance.
(c) Write a Java program using an Abstract Class to find the areas of different shapes.

5. (a) Write a Java program that gives an example of the super keyword.
(b) Write a Java program to implement Interfaces.
(c) Write a Java program that demonstrates Runtime Polymorphism.

6. (a) Write a Java program that describes the Exception Handling mechanism.
(b) Write a Java program illustrating multiple catch clauses.
(c) Write a Java program for the creation of Java Built-in Exceptions.
(d) Write a Java program for the creation of User-Defined Exceptions.
7. (a) Write a Java program that creates threads by extending the Thread class.The first thread displays
“Good Morning” every 1 second. The second thread displays “Hello” every 2 seconds.The third
thread displays “Welcome” every 3 seconds.(Repeat the same by implementing Runnable.)
(b) Write a program illustrating the use of isAlive() and join().
(c) Write a program illustrating Daemon Threads.
(d) Write a Java program for the Producer-Consumer Problem.

8. (a) Write a Java program that imports and uses user-defined packages.
(b) Without writing any code, build a GUI that displays text in a label and an image in an
ImageView (use JavaFX).
(c) Build a Tip Calculator app using several JavaFX components and learn how to
respond to user interactions with the GUI.

9. (a) Write a Java program that connects to a database using JDBC.


(b) Write a Java program to connect to a database using JDBC and insert values into it.
(c) Write a Java program to connect to a database using JDBC and delete values from it.

SIGNATURE OF INTERNAL EXAMINER SIGNATURE OF EXTERNAL EXAMINER

You might also like