Old MathJax webview When book details are entered and the ‘Add Book’ button clicked the input…
When book details are entered and the ‘Add Book’ button clicked the input data should be validated and a Book object created using the below outlined class.
Each Book object should then be added to the array if the array is not already full.
When the ‘Show all books’ button is clicked it should display all books in the listBox (using the toString method)
When the ‘Clear’ button is clicked, all text boxes and the list should be cleared
When the ‘Clear’ button is clicked empty the array (Add a method to the Book class for this).
2. Book class Create a class called Book, whose constructor and public methods are listed in the table below. Each Book has three attributes title, author & price. These attributes have types String, String and double, respectively (ensure all attributes are declared private).
Book(String title, String author, double price)
Constructor method for class
Reduce the price of the book by percentage discount passed in, if the discount is a number between 0 & 100 (not 0 or 100).
Returns details of the book in String format.
When the ‘Clear’ button is clicked empty the array