Question: Simplest answer is more useful 5. Here is a simplified class for representing books owne class Book String title, author; Il title, author String callNumber;
Simplest answer is more useful 5. Here is a simplified class for representing books owne class Book String title, author; Il title, author String callNumber; Il call number, such as "QA567.23 P23" Suppose that a library owns 27,532 books and that information about all the books has already been stored in an array Book[] books = new books(27532); a) A science book is one whose call number begins with the letter 'Q'. Write a method that will count the number of science books owned by the library and return that number HINT there is a string method called charAt). b) Write another method that will print out the answer to this question: Does the library own more books by "Isaac Asimov" or more books by "William Shakespeare"? Write a code segment that will find out. Print the answer with System.out.println(). (20)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
