import java.io.*;
import java.lang.*;
class electricity extends Exception
{
int b1;
electricity(int b)
{
b1=b;
System.out.println("\n\t\t Exception will caught below ");
}
}
class electric
{
static void compute(int a,int b,String name,String bno)throws IOException,electricity
{
name=name;
bno=bno;
if(b<a)
throw new electricity(b);
else
{
int tmr,amt=0,z=0;
tmr=b-a;
do
{
DataInputStream in=new DataInputStream(System.in);
System.out.println("\n\t Click any purpose ");
System.out.println("\n\t\t 1-Domestic ");
System.out.println("\n\t\t 2-Agriculture ");
System.out.println("\n\t\t 3-Industry ");
System.out.println("\n\t\t 4.Exit");
System.out.println("\n\n\t\t Enter ur Choice :");
int ch=Integer.parseInt(in.readLine());
switch(ch)
{
case 1:
if(tmr<=100)
amt =tmr *2;
else if(tmr >100 && tmr <=200)
amt=(tmr-100) *4 +100*2;
System.out.println("\n\n\t\t **********************************************");
System.out.println("\t\t\t Electricity Bill Preparation ");
System.out.println("\t\t **********************************************\n\n");
System.out.println("\n\t\t Name : " +name + " Bill no : " + bno );
System.out.println("\n\t\t Previous Meter Reading : " +a );
System.out.println("\n\t\t Closed Meter Reading :" +b );
System.out.println("\n\t\t Current Meter Reading :" +tmr );
System.out.println("\n\t\t Purpose : Domestic " );
System.out.println("\n\t\t Total Amount Rs. :" +amt );
break;
case 2:
if(tmr<=100)
amt =tmr *0;
else if(tmr >100 && tmr<=200)
amt=(tmr-100) *1 +100*0;
System.out.println("\n\n\t\t **********************************************");
System.out.println("\t\t\t Electricity Bill Preparation ");
System.out.println("\t\t **********************************************\n\n");
System.out.println("\n\t\t Name : " +name + " Bill no : " + bno );
System.out.println("\n\t\t Previous Meter Reading : " +a );
System.out.println("\n\t\t Closed Meter Reading :" +b );
System.out.println("\n\t\t Current Meter Reading :" +tmr );
System.out.println("\n\t\t Purpose : Agriculture " );
System.out.println("\n\t\t Total Amount Rs. :" +amt );
break;
case 3:
if(tmr<=100)
amt =tmr *4;
else if(tmr >100 && tmr<=200)
amt=(tmr-100) *8 +100*4;
System.out.println("\n\n\t\t **********************************************");
System.out.println("\t\t\t Electricity Bill Preparation ");
System.out.println("\t\t **********************************************\n\n");
System.out.println("\n\t\t Name : " +name + " Bill no : " + bno );
System.out.println("\n\t\t Previous Meter Reading : " +a );
System.out.println("\n\t\t Closed Meter Reading :" +b );
System.out.println("\n\t\t Current Meter Reading :" +tmr );
System.out.println("\n\t\t Purpose : Industry " );
System.out.println("\n\t\t Total Amount Rs. :" +amt );
break;
case 4:
System.exit(0);
}
System.out.println("\n\t Continue :");
z=Integer.parseInt(in.readLine());
} while(z==1);
}
}
public static void main(String ar[])throws IOException
{
electric ee=new electric();
String name,bno;
int pmr,cmr;
DataInputStream in=new DataInputStream(System.in);
System.out.println("\n\t ELECTRICITY BILL USING USERDEFINED EXCEPTION ");
System.out.print("\n\t\t Enter the name : ");
name=in.readLine();
System.out.print("\n\t\t Enter the Bill Number :");
bno=in.readLine();
System.out.print("\n\t\t Previous Meter Reading : ");
pmr=Integer.parseInt(in.readLine());
System.out.print("\n\t\t Current Meter Reading : ");
cmr=Integer.parseInt(in.readLine());
try
{
compute(pmr,cmr,name,bno);
}
catch(Exception e)
{
System.out.println("\n\t\tUserDefined Exception is found");
}
}
}
I Want the Java Coding For Creating Phone Bill & Customer Name & Her Details, Plz Send The Coding For Creating Phone Bill, Thank You Regards Suresh
Yes.
if (has_enough_money) { pay_the_bill(); }
One benefit of a solar power system is that it is clean energy. Using the power of the sun to create electricity does not produce any pollution. Another benefit of solar power systems is the savings on the electricity bill.
No. Your energy meter monitors the supply voltage and the in-phase component of the load current, so improving your power factor will have no effect on your energy consumption and, therefore, your electricity bill.
Heating is not typically included in the electricity bill. Heating is usually a separate expense that is paid for separately, either through a gas bill or another heating source.
Debit electricity expensesCredit cash / bank
preparation of bill signing of bill
I Want the Java Coding For Creating Phone Bill & Customer Name & Her Details, Plz Send The Coding For Creating Phone Bill, Thank You Regards Suresh
debit electricity billcredit bank
how do i post electricity bill owe for 4 months back
The average electricity bill in Ohio varies depending on the type of home you live in. The average electricity bill can range from $30 for an apartment to $90.
The average electricity consumption is 4,800 kWh per is average UK electricity bill is £669.60
Bill preparation. The House Member (or the Congressman/woman) prepares and drafts the bill.
Bill preparation. The House Member (or the Congressman/woman) prepares and drafts the bill.
Solar lights affect the electricity bill by reducing the cost of the bill. It is used to help someone not to have a high electricity bill. These are very good lights.
You get the bill. If you pay it, the electricity stays on; if you don't pay it, the electricity gets turned off.