You are on page 1of 4

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/ Calculation Viva- Record Total


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

1. Implement a java program that illustrates the following Concept

(i) Creation of a simple package (ii) Accessing a package (ii) Implementing interfaces
2. Write a Java program to perform the following operations:
(i) Insert an element into a binary search tree.
(ii) Delete an element from a binary search tree.
(iii) Search for a key element in a binary search tree.

3. Implement a Java program to perform the following operations:


(i) Insert an element into a sequential search tree.
(ii) Delete an element from a sequential search tree.

(iii) Search for a key element in a sequential search tree.

4. a) Java programs for implementing the following sorting methods:


(i) Bubble sort (ii) Selection sort
(iii)Implement Java programs by using sorting methods: quadratic sorting algorithms
(1)Selection sorting (2)Insertion sorting

Page 1 of 4
5. Write Java programs to implement the following using a singly linked list
(a) Stack ADT(b) Queue ADT

Implement a Java program to implement the following using classes and objects
(a) Stack ADT(b) Queue ADT

6. Develop a Bank Application that manages deposit and withdrawal.

Develop a java code to implement a Bank Application that manages deposits, account
balances, and withdrawals by using the inheritance concept.

7. Write a java program that implements a multi-threaded application that has three threads.
The 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 even, the third
thread will print the value of the cube of the number.

8. Implement a program to perform file operations i) new File creation, ii) retrieve file the
properties (information about the file) iii) File read and write.

9. Implement a code to demonstrate the features of i) generics class ii) generics method

10. Develop applications using JavaFX UI controls i) Label ii) button

11. Develop applications using JavaFX UI controls i) Radio Button ii) Checkbox

12. Develop applications using JavaFX UI controls i) Text Field ii) Password

13. Develop applications using JavaFX UI controls i) Hyperlink ii) Menu

14 Implement a Java code using JavaFX Layouts properties: i) BorderPane ii)HBox

15. Implement any two properties of JavaFX Layouts.

Page 2 of 4
12. Implement a Java Program to create an abstract class named Shape that contains two
integers and an empty method named printArea (). Provide three classes named
Rectangle, Triangle, 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.

13. Implement a Java Program to create an abstract class named Shape that contains two
integers and an empty method named printArea (). Provide three classes named
Rectangle, Triangle, 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 by using an interface.

14. a) Develop a simple calculator application using Java Concept.

b) Implement an exception handling throwing an exception for Checking the @symbol in


email-id

15. Implement a Java Application to generate an Electricity bill and create a class with the
following members. The Consumer no., Consumer name, previous month reading, current
month reading, and type of EB connection is domestic. Calculate the amount to be paid
as follow.

-The domestic consumers will have to pay Rs 4.50 per unit consumed, as against Rs 3 per
unit up to 500 units, up to 400 units for two months and Rs 6.50 per unit from 401 to 500
units, and Rs 8 per unit for 501 to 600 units.The cost will be Rs 9 a unit for up to 601 to 800
units consumed, Rs 10 per unit will be charged for 801 to 1,000 units while Rs 11 per unit
will be levied for above 1,000 units.

16. Implement a Java Application to generate an Electricity bill and create a class with the
following members. The Consumer no., Consumer name, previous month reading, current
month reading, and type of EB connection is commercial. Calculate the amount to be
paid as follow.

For 0 to 200 units, for the first 100 units cost is zero, and for the next 100 units, the
consumer shall pay 1.5 per unit. For 0 to 500 units, the consumer shall pay 0 for the
first 100 units, for the next 100 units the consumer shall pay 2 per unit, for the next 300
units the unit cost is 3.00/-

17. a) Implement a java code for the multiplication table by using Multi-threading.

b) Implement an exception handling throwing an exception for password mismatch

Page 3 of 4
18. a) Develop a Java Program to create an abstract class named Shape that prints the
volume of a cube for given a Surface Area

b) Implement a Java Application to compute age in terms of years, months, weeks, days,
hours, minutes, and seconds for a given (input) date of birth.

19. a) Implement a Java Application to compute any one of the online reservation systems by
using the required java concepts.

b) Implement a java application to convert kilogram to gram and Celsius to Fahrenheit


using an interface

20. a) Create a java code to implement a class and object using a class name Dogs, Data
members (Object) are color, size, age, etc., Methods are sleep, sit, run, etc.,

b) Write a java code to implement a User-Defined Exception for Validating Login


Credentials.

Page 4 of 4

You might also like