Problem statement
Design the object model and core APIs for a flashcard study app whose spaced-repetition scheduler decides which cards a learner reviews each day and when each card is next due.
Operating context. A learner owns decks; each deck holds cards with a front (prompt) and a back (answer). Studying a deck starts a review session that serves the cards currently due. For each card the learner grades their recall (again / hard / good / easy); the scheduler updates that card's interval, ease, and next-due date from the grade. Cards move through learning stages (new, learning, review, lapsed) as they succeed or fail. The scheduling algorithm (an SM-2-style rule for v1) must be replaceable without rewriting the session or the cards. Everything runs on-device, and time comes from an injected clock so a test can simulate weeks of study.
Out of scope. Cloud sync and multi-device study, media / audio on cards, deck sharing and a marketplace, import / export formats, and the UI — model the domain and the scheduling seam.
What to produce. The class hierarchy (Card, Deck, the review scheduling state, the scheduler algorithm, a review session, a grade type), the public API each exposes, and the states a card moves through. Be explicit about: how the scheduler is pluggable so SM-2 swaps for another algorithm without touching Card or the session, how 'due today' is computed against an injected clock, and how a review session iterates due cards and applies grades.
Requirements
This assessment is a Premium feature.
The statement above is free to read. The functional and non-functional requirements, and the graded canvas that scores your design against them, come with Premium.
Topics
- System Design LLD
- Oop Solid
- Patterns Strategy
- Domain Spaced-Repetition
- Patterns State