Design a Library Management System
A library management system keeps track of what a library owns, who has borrowed it and who is waiting for it. A member borrows a copy, brings it back on time or late, and joins a waiting list when every copy of a book is out. The librarian at the desk and the self-checkout kiosk both go through the same rules. At Fidelity this prompt has been around for years, and it comes in a few shapes. Some versions ask for the class diagram and then an explanation of inheritance based on your UML, the boxes-and-arrows notation for class diagrams. Others use the diagram as a plain test of object-oriented programming, or ask how you'd design a library checkout system. One asked how you'd set up a REST API for a library. It has even turned up as a coding task on an online test for data engineers.
This is a low-level design (LLD) round, so expect classes and real code. Scaling barely comes up, since one library's data fits in a single database with lots of room to spare. The hard parts are the modeling choices and the rules around loans, holds and fines. Concurrency matters too, when two people act on the same thing at once. We'll write the classes in Java, since Fidelity is largely a Java and Spring shop. Then we finish with the REST API, the HTTP endpoints a web app or kiosk would call.
FidelityPremium lesson · System design round
The Fidelity design, worked end to end.
- The API and data modelSystem design · Frequently asked
- The design, drawn out3 diagrams
- 5 deep divesWith the tradeoffs
$49 a year · all 107 companies · instant access
20,000+ candidate reports · guide updated
Fidelity interview guideKnow what Fidelity asks before you walk in.
28 coding · 3 system design · 15 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.