1 2 B.E. / B.Tech. Practical End Semester Examinations, April/May 2019
1 2 B.E. / B.Tech. Practical End Semester Examinations, April/May 2019
Aim and Procedure Program Calculation & Results Viva-Voce Record Total
10 40 30 10 10 100
1. 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 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 to EURO, Yen to Euro, INR
2.
to Euro and vice versa), distance converter (meter to KM, inches and feet), time converter (hours
to minutes, hours to seconds, minutes to seconds and vice versa) using packages.
Write a java program that implements a multi-threaded application that has three threads. First
4.
thread generates a random integer every 5 second and if the value is prime, second thread
computes the square of the number and prints and if the value is odd, the third thread will print
the value of cube of the number.
Page 2 of 2
Write a Java Program to create an abstract class named Shape that contains two integers and
5.
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.
Develop a java program for employee salary calculation using multi level Inheritance
6.
To write a Java program that reads a file name from the user, displays information about whether
7.
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 to find the factorial of a number using interface concept.
8.
To write a java program to find the maximum value from the given type of elements using a
9.
generic function.
Write a java program to insert an element into an array and reverse an array using packages
10.
Design a calculator using event-driven programming paradigm of Java with Decimal
11.
manipulations
Design a Java interface for ADT Stack. Implement this interface using array. Provide
12.
necessary exception handling in both the implementations.
Write a program to perform string operations using ArrayList. Write functions for the following
13.
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 that keeps a number from the user and generates an integer between 1 and
14.
7 and displays the name of the weekday.
Test Data
Input number: 3
Expected Output :
Wednesday
Write a Java Program to create an abstract class named sumofTwo and sumofThree. Perform
15.
addition of two numbers and addition of three numbers
Create a new class which implements java.lang.Runnable interface and override run() method.
16
Perform multithreading operation
Write a program to Check Prime Number using Interface.
17.
Calculate the student grade using interface.
18.
A company advertises various products in its website to sell. Products can be either electronics,
19
clothes, jewelry, cosmetics, books ,stationery ,sport s items etc. Offer Zone class shows products
with discounts, special offers etc. Price, Brand of product should be listed along with category
and name of the product, when user specifies name of product. Implement the above scenario
using java concepts like interface and inheritance (use multilevel inheritance with minimum 4
levels along with other types of inheritance).
Write a Java program to implement user defined exception handling. Display the result for the
20
following input a=1, b=0 perform c=a/b.