Question: Write a program (java) to input all of the Book objects from books.txt, as in Lab 2, and also to input into ArrayLists the three
Write a program (java) to input all of the Book objects from books.txt, as in Lab 2, and also to input into ArrayLists the three attached index files, which refer to the index positions within the ArrayList of Books, from 0 to 32. You may use your Book class from Lab 2 without modification. One try block with four instantiations of Scanner objects for the 4 files will work. Then, input the books and each of the index files into four ArrayList objects. Finally, print a menu as follows and display the books in the various orders until the user selects 5 to quit:
Display the books in order by: 1. Original order 2. By price 3. By title 4. By type 5. quit Enter your choice:
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
