import java.io.*;
class ElectricBill {
String n;
int units;
double bill ;
void accept() throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
System.out.print(“Name of the customer = “);
n = reader.readLine( );
System.out.print( “Number of units consumed = “);
String un = reader. readLine( );
units=Integer .parselnt(un);
}
void calculate!) {
if(units < = 100)
bill = 2.00*units;
if(units< =300) bill = 3.00*units;
if (units > 300) bill = 5.00*units;
}
void print( ) {
System.out.println(“Naine of the customer:” +n);
System.out.println(“Number of units consumed:” +units);
System.out.println(“Bill amount:” + bill);
}
public static void main(String argsQ) throws IO
Exception { ElectricBill eb = new ElectricBill( );
eb. accept!);
eb.calculate();
}
}