Posts

Showing posts from October, 2020
  CURRENCY CONVERTER, DISTANCE CONVERTER AND TIME CONVERTER IMPLEMENTATION USING PACKAGES AIM: To 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. ALGORITHM:   1.        Start 2.        Create a Package currencyconversion and place the class currency under the package 3.        Create the methods to perform currency conversion from dollar to rupee, rupee to dollar, euro to rupee,   rupee    to euro, yen to rupee and rupee to yen.                   4.        Create the package distanceconverion and create the class distance within the package         ...
  ELECTRICITY BILL GENERATION AIM:   To 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   ALGORITHM:   1.   Start 2.   Create a class Ebill with three member functions: getdata(), calc(), display() and object...

Object Oriented Programming Lab

OBJECT ORIENTED PROGRAMMING LABORATORY  LIST OF EXPERIMENTS:   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   2.             ...