Java Foundations

Lesson 7 of 7

Final Project: Library Management Console App

Combine everything from this course into a small, real console application: a library management system.

Requirements

  1. Create a Book class with fields for title, author, and a checked-out boolean, plus a constructor and getter methods.
  2. Create a Library class holding a List<Book>, with methods addBook(Book b), checkOut(String title), returnBook(String title), and listAvailable().
  3. Use a Map<String, Book> (keyed by title) internally if you'd like faster lookups than scanning the list, either approach is fine.
  4. main should add at least 3 books, check one out, attempt to check out an already-checked-out book (and print a clear message instead of crashing), then list what's still available.
  5. Define at least one interface (e.g. Searchable with a search(String query) method) and implement it on Library.

Stretch goals

  • Add a Member class and track which member currently has each book checked out.
  • Support returning a book by member name instead of just by title.
  • Sort the available books alphabetically before printing them.

Submit a link to your finished project below, an instructor will review it before you can mark this lesson complete. Good luck!

This lesson ends in a project. Build it on your own machine, there's nowhere to submit it here, but the brief above is everything you need.