0

Please run this code and let me know why it is throwing an error

https://code.sololearn.com/cAqSUb1QR2hM/?ref=app

29th May 2020, 5:27 AM
vinay kumar singh
vinay kumar singh - avatar
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(); }
29th May 2020, 6:59 AM
Avinesh
Avinesh - avatar