[SOLVED] Java Exam: Book Cataloging System You must submit the completed program as per the course instructions. P0

100.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Java-Exam-Book-Cataloging-System-0suuf5.zip (198 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
5/5 - (2 votes)

You CANNOT:
● Work with someone else on this exam.
● Copy from someone else’s exam.
● Use StackOverflow or any search engine, such as Google.com, for any reason (other than to go to the course exam or approved resources).
● Use an internet search for keywords in the exam. For example, do not Google “loading a
.csv file in Java”.
You CAN:
● Reference any material from the course or recitation that can be accessed in the course site. This includes videos, readings, slides, code samples, homework Add
assignments, quizzes, and practice coding exercises.
● Reference approved online Java documentation such as https://docs.oracle.com/en/java/, https://www.w3resource.com/java-tutorial/, and https://www.baeldung.com/
Use of Course Discussion Board as it Relates to the Exam
● You CAN ask any questions on the course discussion board that directly relate to the exam logistics and/or technical errors with Codio or Canvas. For example, you can ask about a glitch in Codio unrelated to your code.
● You CANNOT ask a question specifically related to code or “how to do something”. For example, you cannot ask “How should I go about writing the code for this method?”. You also cannot post code and ask “Can you help me understand why my code isn’t working?”
The Assignment
This Java exam will involve implementing a book cataloging system. You will be provided with the skeleton of the program and you will have to implement the methods and write the unit tests. The design of the program has been set up for you.
In this system, book files can be loaded, parsed, and managed in a book catalog. Books
(represented by a Book class) are loaded and stored in a book catalog (represented by a BookCatalog class). A BookFileReader class will take care of initially loading the book files and doing some basic clean-up.
The Book class will take care of extracting the book title and author, counting the total number of words, and getting a count of each unique word (case-insensitive). The BookCatalog class will allow for adding books and looking up books based on their title or author.
Overall, the program will load three different book files (.txt) with BookFileReader, create three Book objects, and store them inBookCatalog. The required methods are already called in the main method in each section of the exam. Exam Instructions
To help guide you through implementing the program,Add the exam has been split into 4 sections.
For each section, there will be 2 tasks. The first task will be to complete the required methods in one java file and the second task will be to complete the unit testing for those methods in another java file. You will be provided with all of the necessary java files to complete the tasks in each section.
You are not required to complete the sections in a specific order. This is merely set up as a guide.
Exam Overview
For each section on the exam, the first task is to complete the required methods in the given class file. Then compile and run your code. Hints have been provided for some methods.
● Javadocs have already been provided
● You can create any number of helper methods, with appropriate names and javadocs
● Name your variables appropriately
● Add brief comments to all non-trivial lines of code
● For convenience, all of the required methods in the given class file are already called in its respective main method (follow along to learn the sequence of the methods). (Note, you are not required to run the main method in the given class file.)
The second task is to test your code by running (and passing) the provided test cases in the given test class file. (Do not modify any of the provided test cases!) Then write additional test cases for each test method as noted and make sure they pass as expected.
● The provided test cases are just SOME of the unit tests used for the autograded portion of this assignment. There will be more tests for the full autograded portion. ● You do not have to write unit tests for any helper methods you write.
The final structure of the project in the Codio Filetree should look like the image on the left.
Codio Eclipse

Add
Exam Outline
● Section 1
○ Task 1: BookFileReader.java
■ Complete the parseFile method in the BookFileReader class.
Compile and run your code.
● Note: You can use the “Run Your Program – BookFileReader” option in Codio to run the main method in this class.
○ Task 2: BookFileReaderTest.java
■ Test your code by running (and passing) the provided test cases in the BookFileReaderTest class. Write additional test cases as noted in the testParseFile method and make sure they pass as expected. At the end, the testParseFile method should have a total of 3 distinct
test cases.
● Note: You can use the “Run JUnit Tests” option in Codio to run all tests.
● Section 2
○ Task 1: Book.java
■ Complete the setTitleAndAuthor, getTitle, and getAuthor
Add methods in the Book class. Compile and run your code.
● Note: You can use the “Run Your Program – Book” option in Codio to run the main method in this class.
○ Task 2: BookTest.java
■ Test your code by running (and passing) the provided test cases in the BookTest class. Write additional test cases as noted in the testBook, testGetTitle, and testGetAuthor methods and make sure they pass as expected. At the end, each test method should have a total of 5 distinct test cases.
● Note: You can use the “Run JUnit Tests” option in Codio to run all tests.
● Section 3
○ Task 1: Book.java
■ Complete the countWords, getTotalWordCount, getUniqueWordCount, and getSpecificWordCount methods in the Book class. Compile and run your code.
● Note: You can use the “Run Your Program – Book” option in Codio to run the main method in this class.
○ Task 2: BookTest.java
■ Test your code by running (and passing) the provided test cases in the BookTest class. Write additional test cases as noted in the testGetTotalWordCount, testGetUniqueWordCount, and
testGetSpecificWordCount methods and make sure they pass as expected. At the end, testGetTotalWordCount should have a total of 7 distinct test cases, and testGetUniqueWordCount and testGetSpecificWordCount should have a total of 6 distinct test cases.
● Note: You can use the “Run JUnit Tests” option in Codio to run all tests.
● Section 4
○ Task 1: BookCatalog.java
■ Complete the addBook, getBookByTitle, and
getBookByAuthor methods in the
BookCatalog class. Compile
and run your code.
● Note: You can use the “Run Your Program – BookCatalog” option in Codio to run the main method in this class.
○ Task 2: BookCatalogTest.java
■ Test your code by running (and passing) the provided test cases in the
BookCatalogTest class. Write additional test cases as noted in the Add testAddBook, testGetBookByTitle, and
testGetBookByAuthor methods and make sure they pass as expected. At the end, each test method should have a total of 5 distinct test cases.
● Note: You can use the “Run JUnit Tests” option in Codio to run all tests.
Evaluation
1. Did you implement the individual methods correctly? – 30 points
a. Can you get the total count of words for each book?
b. Can you get each book by its title or its author?
c. Does your program successfully load and parse the .txt files and store the books in the book catalog?
2. Did you write good unit tests? – 20 points
a. Did you make sure each test method has the required number of test cases?

Introduction to Software Development

b. Does your program pass all of your own tests?

  • Java-Exam-Book-Cataloging-System-0suuf5.zip