import java.util.*;
class ebill
{
public static void main (String args[])
{
customerdata ob = new customerdata();
ob.Getdata();
ob.Calc();
ob.Display();
}
}
class customerdata
{
Scanner in = new Scanner (System.in);
Scanner ins = new Scanner (System.in);
String cname,fname;
int bn;
double units,tbill;
void Getdata()
{
System.out.print ("\n\t Enter block number = ");
bn = in.nextInt();
System.out.print ("\n\t Enter flate name = ");
fname = ins.nextLine();
System.out.print ("\n\t Enter customer name = ");
cname = ins.nextLine();
System.out.print ("\n\t Enter total consumed units = ");
units = in.nextDouble();
}
void Calc()
{
if (units<100)
tbill=0.40*units;
else if (units>100 && units<300)
tbill=0.50*units;
else
tbill=0.60*units;
if (tbill>150)
tbill+=tbill*0.15;
}
void Display()
{
System.out.println ("\n\t Customer name = "+cname);
System.out.println ("\n\t Total units = "+units);
System.out.println ("\n\t Total bill = RM "+tbill);
}
}
Hey there I am so thrilled I found your weblog, I really found you by accident, while I was researching on Google for something else,
ReplyDeleteAnyhow I am here now and would just like to say thanks
for a tremendous post and a all round entertaining blog (I also love the
theme/design), I dont have time to look over it all
at the minute but I have book-marked it and also added your
RSS feeds, so when I have time I will be back to read a lot more,
Please do keep up the superb work.
Also visit my web page :: professional forex signals
Hi! This is kind of off topic but I need some help from an established blog.
ReplyDeleteIs it very difficult to set up your own blog? I'm not very techincal but I can figure things out pretty fast. I'm thinking about making my own but I'm not sure where to start. Do you have any tips or suggestions? Many thanks
Also visit my webpage : Dr Charles DC
i need to do tracking of the electricity bill. how will i do that please help. urgent. show how to create it...
ReplyDeleteLet me know what type of tracking you need.
Deleteelectricity bill tracking
Deleteelectricity bill tracking
Deletei need electricity bill tracking status code i.e(creating a file,searching a file ,check wether the customer cleared his last months due or not,displaying coustomers record) help me please
ReplyDeleteVideo rental inventory system
ReplyDeleteThis comment has been removed by the author.
ReplyDelete