Question: Create a class called Book that has three instance variables: title, author, and price. Create a constructor that assigns the parameters to the instance variables
Create a class called Book that has three instance
variables: title, author, and price.
Create a constructor that assigns the parameters to the
instance variables
Create three accessor methods to return the above variables
Create one modifier method that changes the price value
Create a toString method to return the book object
Create another class called library and create books with
the following information:
The Giving Tree
The Phantom Tollbooth
Romeo and Juliet
Create a Book array that has spaces for books and store
the book objects you created earlier
Create a static method that takes a Book array and an
integer limit and returns the number of books that exceed
the limit price
Create a static method that takes a Book array and returns
the title of the most expensive book in the library
Create a static method that takes a String called bookTitle
and returns the author of that book if not found return
null
Create a static method that takes a Book array and returns
the average book price in the library
Create a static void method that takes a Book array and
character called start and displays all the information
about the books that start with the given character
Create a static void method that takes a Book array and all
information about a new book title author and price and
store the book in the first spot available in the array. If
there is no space available display an appropriate
statement that the library is full and no more space is
available or a similar statement of your choice
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
