🎯 Objective
Develop a program that utilizes a class named LibraryBook
to manage a library's book collection. The program should prompt the user to input details about a book, then display that book's information.
Instructions:
Class Definition: LibraryBook
This class represents a book in the library's collection.
Attributes:
Book Title
Author's Name
Publication Year
ISBN Number
Check-out Status (whether the book is checked out or available)
Constructor(s):
Define the constructor(s) as per your discretion and understanding.
Methods:
Getters/Setters for each book attribute
checkOut()
andreturnBook()
methods to change the Check-out Status of a bookprintBookInfo()
to display the book's information, including its check-out status.
User Prompts:
Your program should prompt the user for the following book attributes:
Book Title
Author's Name
Publication Year
ISBN Number
LibraryBook Class Processing:
After obtaining user input, the program should use the
LibraryBook
class to:Create a new book object with the inputted attributes, with the Check-out Status set to 'available'
Give the user the option to 'check out' the book, changing the Check-out Status to 'checked out'
Program Outputs:
Lastly, your program should print out the book's information, including:
Book Title
Author's Name
Publication Year
ISBN Number
Check-out Status
Here's an example output:
Title: The Great Gatsby Author: F. Scott Fitzgerald Publication Year: 1925 ISBN: 1234567890 Check-out Status: Available
Then, after the book is checked out:
Title: The Great Gatsby Author: F. Scott Fitzgerald Publication Year: 1925 ISBN: 1234567890 Check-out Status: Checked Out
🚚 Deliverables
Upload the following files in a zip folder that you have created:
Java class files
Screenshot of the Console with the code executing