Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is a Java Project, Please comment as you do for clarification. Thank you ! Project 8: Books in the Bookcase 1 Objective Our last

This is a Java Project, Please comment as you do for clarification. Thank you !

image text in transcribed

image text in transcribed

image text in transcribed

Project 8: Books in the Bookcase 1 Objective Our last project will give you an opportunity to use many of the concepts you've learned throughout the quarter. It will include the familiar (objects, reading from a file, user input, menus), plus a few new things like writing to text files, storing user-defined objects in an ArrayList, and creating and implementing interfaces. The result will be a small but full-featured console application. You'll be given little scaffolding here, so design and test well 2 What to Create We're writing an application that deals with books, collections of books (we'll call that a bookcase), and the UI client for those classes. 2.1 Interfaces and Classes Write an interface called Quotable (as in citations for written reports) that requires the implementation of typical accessor features that return a book's ISBN, Author, Title, and Publisher (all strings) as well as the Publication Year, Month, and Day (all integers) and a Page Count (an integer) Write a Book class that implements the Quotable interface. Bookcase will need to sort books by their ISBN numbers, so in Book you'll need to provide support for that as wel (hint: this requires that Book implement an additional interface (one you don't have to write, just implement) and write an additional method (which should only need one line of code), and that Bookcase make a simple call to make the sort happen) There should be no statics here. This is Supplier code; there should be no communication with the user Write a Bookcase class that maintains an ArrayList of books. It should provide basic accessors (book count, book at a specified position), provide search and add/delete functionality (search by ISBN, add book with all details, delete book by ISBN), file i/o functionality (read books from its data file, write books to the same data file'), and provide other helpful methods (sort books into ISBN order, clear the bookcase of books). There should be no statics here. This is Supplier code; there should be no communication with the user Write a BookcaseUI class with static methods that include main and other necessary methods. Except for the UI-laden methods, most of these methods should consist of only a line or two; the other classes should do the heavy lifting (continues...) 1The file format is up to you. Consider this your sole data file, so make sure you can successfully "round trip" (write, exit, restart, and read) to make sure you've done your work correctly. Note that the user doesn't get to choose the file, it's just a single file you use for your data The code should load data from the file when it begins and write the data back to the same file when the program exits. It should ensure books always remain in sorted order. It should display a looping menu offering options: 1. Display all library books 2. Add a book2 3. Delete a book 4. Exit the program 2.2 General We don't need a variety of constructors here; create constructors that include everything needed. You know enough that all your Ul should guard against bad data types and out-of-range data; handle these gracefully with positive user interactions. Let the user try again if they make a mistake. Provide preconditions wherever they make sense and help guard against data from outside the class that might cause crashes or other bad behavior; throw appropriate exceptions in those cases. Both Book and Bookcase should have toString methods with attractive output. Bookcase should use a for each loop, so all its books are summarized in its toString results. Both Book and Bookcase classes should have JUnit classes/methods that properly test the code. 2.3 UML Class Diagram

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

3 > O Actual direct-labour hours Standard direct-labour hours...

Answered: 1 week ago

Question

Describe the new structures for the HRM function. page 724

Answered: 1 week ago