Question: In Java, I have a code that needs a couple changes. ASAP, I need to get it within the next 3 0 minutes, so please
In Java, I have a code that needs a couple changes. ASAP, I need to get it within the next minutes, so please just help as much as you can fast and Ill give you an upvote!
So basically, we have a code that reads from an input file. Theres a tab between each word and different sections. I got the code working, and I got the exceptions all written, but I have two things that won't work. I'll address what they are and then provide the code needed to be repaired.
The code takes an input from the user of a ID and then prints various things.
I have a class set up for the exception, but I do not have the BookSearch class setup to throw the "BookIdAlreadyExistException" so I need it to throw that when the user enters an ID that is found in multiple books it is the first part of the array
I need the code to print out a # of total books and print out all the titles of the books after the user puts in the input. Right now it just loops and asks for another input.
I was able to get the code to print out the list of books before the input, but thats not what I need, if it helps heres the small section for that
int count;
forint i;i booksOut new ArrayList;
while readerhasNextLine
String bookRaw reader.nextLine;
String bookPro bookRaw.splits;
Book newBook new BookbookPro bookPro bookPro bookPro bookPro;
booksOut.addnewBook;
try
Book.bookSearchbooksOut booksOut.size newBook.getId;
catch BookNotFoundException e
System.out.println
egetMessage;
int count;
forint i;i
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
