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

CS8383 OOPS Lab SET

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

CS8383 OOPS Lab SET

Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

ANNA UNIVERSITY: CHENNAI – 600 025

B.E./B.Tech. DEGREE EXAMINATIONS, Nov/Dec-2022

Fifth Semester

CS8383 - Object Oriented Programming Laboratory


(Regulations - 2017)

Time: 3 Hours Maximum Marks: 100

1. Design a Java interface for ADT Stack. Implement this interface using array.Display the
result for the following input 3,4,5,9,77 and print the output.

Aim and Program Calculation & Results Viva-Voce Record Total


Procedure
10 40 30 10 10 100

2. Write a program to perform string operations using Array List. Write functions for the following
a. Append – add at end
b. Insert – add at index 2
c. Search
d. List all string starts with given letter
Aim and Program Calculation & Results Viva-Voce Record Total
Procedure
10 40 30 10 10 100

3. Write a Java program to implement user defined exception handling. Display the result
for the following input a=1, b=0 perform c=a/b.

Aim and Program Calculation & Results Viva-Voce Record Total


Procedure
10 40 30 10 10 100
4. Develop a Java application to generate Electricity bill. Create a class with the following
members: Consumer no., consumer name, previous month reading, current month reading, type
of EB connection (i.e. domestic or commercial). Compute the bill amount using the following tariff.
If the type of the EB connection is domestic, calculate the amount to be paid as follows:
First 150 units – Rs. 1 per unit , 151-250 units – Rs. 2.50 per unit , 251 -500 units – Rs. 4 per unit
> 501 units – Rs. 6 per unit
If the type of the EB connection is commercial, calculate the amount to be paid as follows:
First 150 units – Rs. 2 per unit , 151-250 units – Rs. 4.50 per unit, 251 -500 units – Rs. 6 per unit
> 501 units – Rs. 7 per unit
Aim and Program Calculation & Results Viva-Voce Record Total
Procedure
10 40 30 10 10 100

5.Develop a java application to implement currency converter (Dollar to INR, EURO to


INR, Yen to INR and vice versa), distance converter (meter to KM, miles to KM and vice
versa), time converter (hours to minutes, seconds and vice versa) using packages

Aim and Program Calculation & Results Viva-Voce Record Total


Procedure
10 40 30 10 10 100

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

Aim and Program Calculation & Results Viva-Voce Record Total


Procedure
10 40 30 10 10 100

7. To Write a Java Program to create an abstract class named sumOfTwo and sum of
Three. Perform addition of two numbers and addition of three numbers
Aim and Program Calculation & Results Viva-Voce Record Total
Procedure
10 40 30 10 10 100
8. Write a Java program that reads a file name from the user, displays information about
whether the file exists, whether the file is readable, or writable, the type of file and the
length of the file in bytes.

Aim and Program Calculation & Results Viva-Voce Record Total


Procedure
10 40 30 10 10 100

9. Create a new class which implements java.lang.Runnable interface and override run()
method. Perform multithreading operation.

Aim and Program Calculation & Results Viva-Voce Record Total


Procedure
10 40 30 10 10 100

10. Design a calculator using event-driven programming paradigm of Java with Decimal
manipulations.

Aim and Program Calculation & Results Viva-Voce Record Total


Procedure
10 40 30 10 10 100

11. Write a program to Check Prime Number using Interface.

Aim and Program Calculation & Results Viva-Voce Record Total


Procedure
10 40 30 10 10 100

12. Write a Java program for implementing producer consumer problem using Inter-thread
communication.

Aim and Program Calculation & Results Viva-Voce Record Total


Procedure
10 40 30 10 10 100
13. Write a java program that implements a multi-threaded application that has three
threads. First thread generates a random integer every 10 second and if the value is even,
second thread computes the square of the number and prints. If the value is odd, the third
thread will print the value of cube of the number.

Aim and Program Calculation & Results Viva-Voce Record Total


Procedure
10 40 30 10 10 100

14. Write a java program to insert an element into an array and reverse an array using
packages.

Aim and Program Calculation & Results Viva-Voce Record Total


Procedure
10 40 30 10 10 100

15. Write a program to exhibit simple inheritance, multilevel inheritance and hybrid
inheritance concepts.

Aim and Program Calculation & Results Viva-Voce Record Total


Procedure
10 40 30 10 10 100

You might also like