Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Object Oriented Programming Lab

Subject: Object Oriented Programming & JAVA (LAB-EEE) Code: EEE-694B


Subject: Object Oriented Programming (IT)(LAB-ECE) Code: EC-695A

1. Write a JAVA Program that creates a class called Dimension, which contains two
abstract methods rectangle() and triangle(). Include appropriate methods calculate and
display the area of the rectangle and triangle.

2. Write a program to sort an array of elements using Insertion Sorting technique. Value
should be taken from the key board.

3. Write a program to search an element from an array of elements using Binary Search
technique. Value should be taken from the key board.

4. Write a class called TV with the following attributes, Name of the Company and Screen
Size. Create a subclass called COLORTV, which has a tvType attribute and also create a
BWTV subclass which has a tvPrice attribute. Use super keyword to pass the values from
child class to parent class and print them.

5. Write a program to sort an array of elements using Selection Sorting technique. Value
should be taken from the key board.

6. Write a JAVA program to find the factorial value and the square root value of a
number. The two operations would be performed in two different methods, which are in
different classes.

7. Write a JAVA program to find the Square root value of a number. The method to find
the Square root value would be within an Abstract class. Include appropriate methods to
calculate and display the result.

8. Write a program to sort an array of elements using Bubble Sorting technique. Value
should be taken from the key board.

9. Write a JAVA program to find the factorial value of a number. The method to find the
factorial value would be within an Abstract class. Include appropriate methods to
calculate and display the result.
10. Write a JAVA program to create a package, where the factorial value of a number
would be calculated. Import the package to get the factorial value of that number. Include
appropriate methods to calculate and display the result.

11. Write a JAVA program to find the area of a Rectangle and a Triangle using
Interfaces. Include appropriate methods calculate and display the area of the rectangle
and triangle.

12. Write a JAVA program to find the area of a Rectangle, Triangle and Circle using
method overloading. Here the methods must be constructor methods.

13. Write a JAVA program to create a package, where the square root value of a number
would be calculated. Import the package to get the square root value of that number.
Include appropriate methods to calculate and display the result.

14. Write a JAVA program to create a package, where it would be checked that either a
number is a prime number or not. Import the package to find the result for a number.
Include appropriate methods to calculate and display the result.

15. Write a JAVA program to find either a number is a prime number or not. The method to
find the result would be within an Abstract class. Include appropriate methods to
calculate and display the result.

You might also like