nss-day-cohort-25 / the-librarian-humorous-rabbits

the-librarian-humorous-rabbits created by GitHub Classroom
0 stars 0 forks source link

The Librarian

Your job is to build a system that allows the public to interact with a librarian at a library to get information about books, get a library card, check out books, and return books.

The Library

Build a database of books. Each book will have the following properties.

  1. Book object
  2. Title
  3. Author
  4. Genre
  5. ISBN number
  6. Checked out
  7. Date due (blank string as default)

The Customers

Each of you must define yourselves as an actor in this system. The following properties and methods must be defined.

  1. Favorite genre(s)
  2. An empty bookshelf
  3. First name
  4. Last name
  5. Address
  6. Library card number (blank to start)
  7. Checkout a book. If it's available, add it to your bookshelf.
  8. Return a book. It should be removed from your bookshelf.

The Librarian

Define the Librarian actor in the system. The Librarian has the following responsiblities.

  1. Register a customer by providing a library card number
  2. Checkout a book requested by a customer.
    1. If the book is already checked out, don't give it to the customer.
    2. If the book is available, set its due date for one week in the future, and mark that it has been checked out.
  3. Check a book back in.
    1. If it is overdue, tell the customer that they owe $5.
    2. Mark the book as checked in.
    3. Reset its due date to its default value
  4. If a customer requests which books are in stock for a particular genre, provide a list of corresponding book titles.

Story Mode

Once you have the basic design of the system in place, here's what you should display in the browser.

When any action takes place between the actors, log an entry in a timeline as a DOM component.

  1. Customer got a library card
  2. Librarian provided info about a genre
  3. Customer checked out a book
  4. Librarian charged for a late book
  5. Customer checked a book back in
  6. Librarian gave a book to a customer
  7. Librarian put a book back into library.

etc...