Need help with Java application.

Anonymous
timer Asked: Oct 27th, 2015
account_balance_wallet $20

Question description

Create a java application - BookReader to read from one of three files that will need to be chosen by the user. You will also be required to use methods. 

The output of the program should appear as follows: 

Which book file do you wish to read? 

 1. Computer Books 

 2. Fiction Books 

 3. Magic Books 

 4. Exit 

Your choice is: a

I am sorry, your answer was not valid. 

Which book file do you wish to read? 

1. Computer Books 

2. Fiction Books 

3. Magic Books 

4. Exit 

Your choice is: 5

I am sorry, your answer was not valid.

Which book file do you wish to read? 

1. Computer Books 

2. Fiction Books 

3. Magic Books 

4. Exit

Your choice is: 3 

the char appear here..            

Total Value: $144.60 

Which book file do you wish to read? 

1. Computer Books 

2. Fiction Books 

3. Magic Books 

4. Exit

Your choice is: 4 

A minimum of the following methods must be used. You can use more methods than this but these 5 are required. Do not modify the given main method. all methods should exist in the class but out of the main method. 

1- private static void displayMenu() Displays the menu to the user. 

2- private static int getMenuChoiceFromUser() Gets the user’s input returning it only if it is valid. If not, prompts the user to enter the value again. The value must be between 1 and 4. Use a loop to run until a valid answer is given. This should call the displayMenu method. 

3- private static boolean displayBooksFromFile(String fileName) Outputs the properly formatted table to the user based on the file relative to the given file name. It returns true with no errors. Must return false if there were errors. This should call the printTable method. 

4- private static void printTable(Scanner fileData) Print the table from the scanner object that is reading the file. Use a loop to print each row of the table.  

5- private static boolean isbnIsValid(String isbnToCheck) Determines whether the given ISBN is a valid ISBN. Returns true if the ISBN is valid and false if it is not valid (Hint: all of the ISBNs are valid). 


Tutor Answer

New York University

flag Report DMCA
Review

Anonymous
Wow this is really good.... didn't expect it. Sweet!!!!

Similar Questions
Hot Questions
Related Tags

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors