0
Please run this code and let me know why it is throwing an error
2 Respuestas
0
Change your methods like this.
public void discountedPrice()
{
double amount = price - (price*(discount/100));
System.out.println("Final price:"+amount);
}
public void displayDetails()
{
System.out.println("Isbn:"+isbn+"\nTitle:"+title+"\nAuthor:"+author+"\nOriginal price:"+price);
discountedPrice();
}