You are on page 1of 3

B.E / B.Tech.

PRACTICAL END SEMESTER EXAMINATIONS, NOVEMBER/DECEMBER 2022

Third Semester

CS3381 - OBJECT ORIENTED PROGRAMMING LABORATORY

(Regulations 2021)

Time: 3 Hours Answer any one Question Max. Marks 100

Aim/Principle/Apparatus Tabulation/Circuit/ Calculatio Viva- Record Total


required/Procedure Program/Drawing n& Voce
Results
20 30 30 10 10 100

1. a) Develop a java code to find a key element from a list using a sequential search.

b) Develop a java code to Stack ADTs using classes and objects.

2. a) Develop a java application with an Employee class with Emp_name, Emp_id, Address,
Mail_id, and Mobile_no as members. Inherit the classes, Programmer, Assistant Professor,
Associate Professor, and A Professor from the employee class. Add Basic Pay (BP) as a
member of all the inherited classes with 97% of BP as DA, 10 % of BP as HRA, 12% of BP
as PF, and 0.1% of BP as staff club funds. Generate pay slips for the employees with their
gross and net salary.

b) Develop a code to check whether a number is odd or even using the constructor in java.

3. a) Develop a java code to Insert some elements and Find a key element from an inserted
multiple-element list using a Binary search.

b) Develop a java code to sort an array of elements using selection sort.

4. a) Develop a java code to sort an array of elements using Insertion sort.

b) Develop a java code to Queue ADTs using classes and objects.

5. a) Develop a java Program to create an abstract class named Shape that contains two
integers and an empty method named printArea(). Provide two classes named Rectangle,
and Triangle such that each one of the classes extends the class Shape. Each one of the
classes contains only the method printArea () that prints the area of the given shape.

b) Develop a java code to find an area of the square and rectangle using a java interface

Page 1 of 3
6. a) Develop a java Program to create an abstract class named Shape that contains two
integers and an empty method named printArea(). Provide two classes named Square, and
circle such that each one of the classes extends the class Shape. Each one of the classes
contains only the method printArea () that prints the area of the given shape.

b) Develop a java code to find an area of the rectangle and triangle using a java interface.

7. a) Develop a java program to implement user-defined exception handling.

b) Develop a java code to find an area of the circle using a java interface

8. a) Develop a java code to create a user-defined exception class and handle that exception
using try, catch block.

b) Develop a java program to create an interface that interface is having two methods called
add () and sub(). Create a class for overloading the given methods for the addition and
subtraction of two numbers.

9. a) Develop a java program that implements a multi-threaded application that has three
threads. first thread generates a random integer every second and if the value is even, the
second thread computes the square of the number and prints. If the value is odd, the third
thread will print the value of the cube of the number.

b) Implement a java code to inherit the methods of the parent interface to the child interface
using extends keyword.

10. Develop a java code to create a new file and write content into the newly created file.

11. Develop a java code to read and display file Properties.

12. a) Develop a java code to find the maximum value from the given input using a generic
function

b) Develop a java code to sort an array of elements using a simple sorting technique.

13. Develop applications using any three JavaFX controls.

14. Develop applications using any three JavaFX layouts.

15. Develop applications using JavaFX menus.

Page 2 of 3
16. Develop a simple application using AWT and Swing.

17. Develop a java code to implement a stack and queue ADTs using classes and objects.

18. Develop a java code to implement sorting any two algorithms.

19. Develop a java code to perform any four file operations

20. a) Develop a java code to find a key element from a list using a sequential search.

b) ) Develop a java code to Queue ADTs using classes and objects.

Page 3 of 3

You might also like