Oop Thru Java Lab ExternalQP CSE
Oop Thru Java Lab ExternalQP CSE
Exercise – 1:
a) Write a JAVA program to display default value of all primitive data type of JAVA
b) Write a java program that display the roots of a quadratic equation ax2+bx=0. Calculate the
discriminate D and basing on value of D, describe the nature of root.
Exercise - 2
a) Write a JAVA program to search for an element in a given list of elements using binary
search mechanism.
b) Write a JAVA program to sort for an element in a given list of elements using bubble sort
Exercise - 3
a) Write a JAVA program to implement class mechanism. Create a class, methods and invoke
them inside main method.
Exercise - 4
c) Write a JAVA program for abstract class to find areas of different shapes
Exercise - 5
b) Write a JAVA program to implement Interface. What kind of Inheritance can be achieved?
Exercise - 7
a) Write a JAVA program that creates threads by extending Thread class. First thread display
“Good Morning “every 1 sec, the second thread displays “Hello “every 2 seconds and the third
display “Welcome” every 3 seconds, (Repeat the same by implementing Runnable)
Exercise – 8
1. Write a JAVA program that import and use the user defined packages
2. Without writing any code, build a GUI that display text in label and image in an ImageView
(use JavaFX)
3. Build a Tip Calculator app using several JavaFX components and learn how to respond to
Exercise – 9
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