import java.io.*;
class bookfair
{
//instance variables
String bname;
double p;
double np;
bookfair()
{
bname="";
p=0.00f;
np=0.00f;
}
void input() throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
System.out.println("enter the book name");
bname=br.readLine();
System.out.println("enter the price");
p=Double.parseDouble(br.readLine());
}
void calculate()
{
if(p<=1000)
{
np=p-(p*0.2);
}
else if(p>1000 && p<=3000)
{
np=p-(p*0.1);
}
else
{
np=p-(p*0.15);
}
}
void display()
{
System.out.println("book name\t"+"price\t"+"net peice\t");
System.out.println(bname+"\t"+p+"\t"+np);
}
public static void main(String []args) throws IOException
{
bookfair obj=new bookfair();
obj.input();
obj.calculate();
obj.display();
}
}
class bookfair
{
//instance variables
String bname;
double p;
double np;
bookfair()
{
bname="";
p=0.00f;
np=0.00f;
}
void input() throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
System.out.println("enter the book name");
bname=br.readLine();
System.out.println("enter the price");
p=Double.parseDouble(br.readLine());
}
void calculate()
{
if(p<=1000)
{
np=p-(p*0.2);
}
else if(p>1000 && p<=3000)
{
np=p-(p*0.1);
}
else
{
np=p-(p*0.15);
}
}
void display()
{
System.out.println("book name\t"+"price\t"+"net peice\t");
System.out.println(bname+"\t"+p+"\t"+np);
}
public static void main(String []args) throws IOException
{
bookfair obj=new bookfair();
obj.input();
obj.calculate();
obj.display();
}
}
Sands Casino | New Jersey online casino
ReplyDeleteThe Sands Casino in New Jersey is now open and accepting players from around the world. It has 1,700 카지노사이트 slot machines and septcasino online casino games 바카라 from leading game