0% found this document useful (0 votes)
74 views6 pages

Ime: 3 Hours Max. Marks 100 Aim & Algorithm Program& Result MCQ Viva-Voce Record Total

This document outlines the instructions and questions for a Computer Science and Engineering laboratory examination on Object Oriented Programming in Java. It includes 20 multiple choice and programming questions covering topics like generating electricity bills, currency conversion, employee payroll systems, stacks, string operations, inheritance, polymorphism, exceptions, file handling, and generics. Students are asked to write Java programs to demonstrate their skills in these object oriented concepts. The exam is worth a total of 100 marks and will take place on August 9th, 2021 for 3 hours.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views6 pages

Ime: 3 Hours Max. Marks 100 Aim & Algorithm Program& Result MCQ Viva-Voce Record Total

This document outlines the instructions and questions for a Computer Science and Engineering laboratory examination on Object Oriented Programming in Java. It includes 20 multiple choice and programming questions covering topics like generating electricity bills, currency conversion, employee payroll systems, stacks, string operations, inheritance, polymorphism, exceptions, file handling, and generics. Students are asked to write Java programs to demonstrate their skills in these object oriented concepts. The exam is worth a total of 100 marks and will take place on August 9th, 2021 for 3 hours.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

B.E / B.Tech.

LABORATORY EXAMINATIONS, APRIL/MAY 2021

Third Semester
Computer Science and Engineering
CS8383 - Object Oriented Programming Laboratory

(Common to IT, EIE & ICE)


(Regulations - 2017)
Date: 09.08.2021 Time : 3 Hours
Session:FN Max. Marks 100

Program&
Aim & Algorithm MCQ Viva-Voce Record Total
Result
20 45 15 10 10 100

S.NO. Reg.No. Question Question


no.
Develop a Java application to generate Electricity bill. Create a
1. 830119104034 1.
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 100 units-Rs.1 per unit
• 101-200 units - Rs. 2.50 per unit
• 201 -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 100 units - Rs. 2 per unit
• 101-200 units - Rs. 4.50 per unit
• 201-500 units-Rs.6 per unit
• 501 units - Rs. 7 per unit

Develop a java application to implement currency converter (Dollar


2. 830119104035 2.
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.

Develop a java application with Employee class with Emp_name,


3. 830119104036 3.
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.

Design a Java interface for ADT Stack. Implement this interface


4. 830119104037 4.
using array. Provide necessary exception handling in both the
implementations.

5. 5. Write a program to perform string operations using ArrayList.


830119104038
Write functions for the following

a. Append - add at end


b. Insert – add at particular index
c. Search
d. List all string starts with given letter

Write a Java Program to create an abstract class named Shape that


6. 830119104039 6.
contains two integers and an empty method named print Area().
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 print Area () that prints the area of
the given shape.

Write a Java program to implement user defined exception


7. 830119104040 7.
handling.

Write a Java program that reads a file name from the user, displays
8. 830119104041 8.
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.
Write a java program that implements a multi-threaded application
9. 830119104042 9.
that has three threads. First thread generates a random integer every
1 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.

Write a java program to find the maximum value from the given
10. 830119104043 10.
type of elements using a generic function.

Design a calculator using event-driven programming paradigm of


11. 830119104044 11.
Java with the following options.

a)Decimal Manipulations b) Scientific Manipulations

Develop a mini project for Mark sheet Preparation system using


12. 830119104045 12.
Java concepts.

a) Write a Java program that prompts the user for an integer


13. 830119104046 13.
and then prints out all prime numbers up to that Integer.
b) Write a Java program that checks whether a given string is
a palindrome or not.
Ex: MADAM is a palindrome.

a) Write a Java program for sorting a given list of names in


14. 830119104047 14.
ascending order.
b) Write a Java Program that reads a line of integers, and then
displays each integer, and the sum of all the integers (use
StringTokenizer class).

a) Write a Java program that reads a file and displays a file and
15. 830119104048 15.
displays the file on the screen, with a line number before
each line.
b) Write a Java program that displays the number of characters,
lines and words in a text file.

Develop a mini project for Healthcare system using Java concepts.


16. 830119104049 16.
Write a Java program that illustrates how run time polymorphism is
17. 830119104050 17.
achieved.

Write a java program that illustrates the following


18. 830119104051 18.
a) Creation of simple package.
b) Accessing a package.
c) Implementing interfaces

Write a java program that illustrates the following


19. 830119104052 19.
a) Handling predefined exceptions.
b) Handling user defined exceptions

i) Create a Java program that finds the maximum value based on the
20. 830119104054 20.
given type of elements using generic functions in java.

(ii) (ii)Develop a Java application using packages to implement the


following Distance converter Meter to KM, Miles to KM and vice
versa.

(i) Develop a Java application with employee class includes


21. 830119104301
emp_name, emp_id, address, mail_id, mobile_no as members.
Inherit the classes Programmer, Assistant Professor from employee
class.
Add Basic Pay 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 the pay slips for the employees with their gross and net
salary.

(ii) Design a Java console application for implement string


operations - Search a string in a list, and Display all the strings that
begin with a given letter using ArrayList in java.

(i) Create a Java console application program using interface


22. 830119104302
concepts for abstract data type Stack. Implement Stack operations
PUSH and Display using Array along with exception handling
techniques.

(ii) Develop a Java application with employee class includes


emp_name, emp_id, address, mail_id, mobile_no as members.
Inherit the classes Associate Professor and Professor from
employee class.
Add Basic Pay as the member of all the inherited classes with 90%
of BP as DA, 12% of BP as HRA, 14% of BP as PF, 0.2% of BP for
staff club fund.
Generate the pay slips for the employees with their gross and net
salary.

(i) Design a Java console application program for implement string


23. 830119104303
operations – Append and Insert the value at particular Index using
ArrayList in java.

(ii) Develop a Java application using packages to implement the


following currency converter Dollar to Indian Rupees, Euro to
Indian Rupees, Yen to Indian Rupees and vice versa.

Create a Java application to find the area of different shapes using


24. 830119104304
abstract class.
Use the abstract class Shape that include two integers and an empty
method named printArea(). Construct the classes Rectangle,
Triangle and Circle inherited from the class Shape. The Derived
classes should include only the method printArea() that print the
area of the given shape.

(i) Write a Java application for Banking transaction system that


25. 830119104701
helps the users to do their credit transactions. Rises user defined
exception while encountering errors during credit transaction and
also solves the exception by using appropriate handling techniques.

(ii) Develop a Java application using packages to implement the


following Time converter – Hours to minutes, seconds and vice
versa.

(i) Perform the following operations by using the Java program for
26. 830119104702
file handling process.
Get the file name from the user. Display the information about the
file with various properties like Availability of the file, Readable or
Writable or both, type of the file and length of the file in bytes.

(ii) Create a Java console application using interface concepts for


abstract data type Stack. Implement Stack operations POP and
Display using Array along with exception handling techniques.

(i) Write a Java application for Banking transaction system that


helps the users to do their credit transactions. Rises user defined
exception while encountering errors during credit transaction and
also solves the exception by using appropriate handling techniques.
27. 830118104306 27
(ii) Develop a Java application using packages to implement the
following Time converter – Hours to minutes, seconds and vice
versa.

You might also like