Design a Credit Card System (OOD)
A credit card is a loan with a plastic handle. The bank gives the customer a credit limit, say $5,000. Every purchase borrows against it, and once a month a statement says what's owed and by when. Pay it all and you owe no interest. Pay less and interest starts building on what's left. The part most people never see is the gap between the swipe and the bill. When you tap your card at a restaurant, the bank approves $50 and holds that much of your credit. A day or two later the restaurant settles for $60 with the tip, and that's the amount that lands on your account. Two events, two amounts, one purchase. A good design models both.
This is a low-level design (LLD) round, also called object-oriented design (OOD), so the interviewer wants classes, methods and real code more than boxes for a million users. We'll write it in Java, since Fidelity's technical interviews lean hard on Java and Spring. The interesting parts are the modeling choices, the state of each purchase and the money rules. Concurrency matters too, because two cards can share one credit limit.
FidelityPremium lesson · System design round
The Fidelity design, worked end to end.
- The API and data modelSystem design
- 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.