It was a home assigment. I will try to detail it the best I can.
It was about designing a simple Library Management System. Here are the requirements:
The system should be able to keep track of all the borrowable items in the library: a) Books have a unique ID, title, author, and publication year. b) DVDs have a unique ID, title, runtime, director and publication year. c) Don't implement: prepare scenario how to include borrowable board games in the future.
Users should be able to search for a borrowable item by its title or type (DVD or book).
Users should be able to borrow an item for a certain period. If the item is already borrowed, users should be able to join a waitlist.
The system should keep track of all the users and the books they have borrowed.
Work in the Observer Pattern in order to watch for items returning to the library to notify waiting users. In theory: what other patterns might be applicable?
Guidelines:
Use object-oriented principles to design classes and their relationships.
Use any object oriented programming language [c#, java, go, ...].
Discuss how you would handle potential edge cases or errors.