Question: JAVA PROGRAMMING HELP: Java in eclipse, each class as a different .java file Expected output: _ _ One of a Kind The Heart of the
JAVA PROGRAMMING HELP: Java in eclipse, each class as a different .java file
Expected output:
_
_
One of a Kind
The Heart of the Betrayed
The Vision of Roses
Our Hill of Stars
One of a Kind Our Hill of Stars
The Heart of the Betrayed The Vision of Roses
Note: Underscores are empty string
Write a program intended to manage a library. Your program should create an interface for users to perform a series of operations, and define the following classes: o Book: Contains two strings for a title and genre Implements a parameterized constructor for setting the above Implements a ToString() method that will print only the title of the book O o o o O o BookShelf: Contains a character representing the first letter of the title of each book in this shelf Contains an ArrayList of Books. This should contain a maximum of eight books Implements a default constructor and getter/setters for the above Implements a void method that will add a Book to this shelf IFF the Book's title begins with the correct letter for the shelf. If the Book is not appropriate for this shelf, simply return Implements a void method that will remove a Book from this shelf Implements and overrides the ToString() method, which will print each Book title in the shelf on a single line. Each title should be separated by three spaces. If there are no books in the shelf, print Empty" instead. O o o Library Tester: Contains only a main method that performs the following: Instantiate two different BookShelf objects, with bookshelf titles being 'O', 'T'. Print both Bookshelf objects Instantiate the following four Books "One of a kind - Fantasy "The Heart of the Betrayed" - Romance "The Vision of Roses" - Crime "Our Hill of Stars" - Science Fiction Print each of these Books (from top to bottom) Attempt to add each Book to both shelves Print both BookShelf objects, starting with the BookShelf intended for book titles starting with 'O' (then 'T')
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
