← Back to Week 2 Hub
Workshop 2w — Full Workshop Project

Neighborhood Library

Build a book checkout system with a menu-driven flow — this is the Week 2 workshop

What You're Building

Build a neighborhood library system where users can browse books, check them out, and return them. Create a Book class with five properties. Your inventory is an array of 20 or more books, all preloaded (no adding books at runtime). The home screen shows three options: Show Available Books, Show Checked Out Books, and Exit. When viewing available books, the user can select one to check out. When viewing checked out books, the user can select one to check back in.

Book Class Fields:

idUnique book identifier (int) isbnISBN number (String) titleBook title (String) isCheckedOutCurrently checked out? (boolean) checkedOutToName of borrower (String, empty if available)
This is a workshop project — it is larger than a regular exercise. It combines classes, arrays, loops, and menu logic into one complete application. Take it one screen at a time.
Example Run — All Screens
Home Screen
Welcome to the Neighborhood Library!

What would you like to do?
1 - Show Available Books
2 - Show Checked Out Books
0 - Exit

Enter your choice: 1

Available Books Screen
Available Books:
1 - ISBN: 978-0061120084 To Kill a Mockingbird
2 - ISBN: 978-0451524935 1984
3 - ISBN: 978-0743273565 The Great Gatsby
... (more books)

Enter the ID of the book to check out (0 to go back): 2
Enter your name: Maria

Book checked out to Maria. Enjoy!

Checked Out Books Screen
Checked Out Books:
2 - ISBN: 978-0451524935 1984 (Checked out to: Maria)

Enter the ID of the book to check in (0 to go back): 2

Book has been checked in. Thank you!

Exit
Enter your choice: 0

Thank you for visiting the Neighborhood Library!
Key details: Available Books only shows books where isCheckedOut is false. Checked Out Books only shows books where isCheckedOut is true, along with who has them. After checking out or checking in, the user returns to the home screen.
Concepts You'll Use
Flow Diagram
Create Book class 5 private fields + getters/setters
Preload 20+ books All start as available
Show home menu 3 options + prompt
User picks option 1, 2, or 0
Option 1: Available List books not checked out
Check out? Pick a book or go back
Ask name, mark out Update isCheckedOut + checkedOutTo
Option 2: Checked Out List books that are out
Check in? Pick a book or go back
Mark available Clear isCheckedOut + checkedOutTo
Back to home menu Loop until user picks 0
Exit Goodbye message

Workshop 2w — Neighborhood Library

← Vehicle Inventory