Capstone Brief: Requirements
beginner12 min readLesson 64 of 204
The specification you build against: features, constraints, acceptance criteria, and milestones.
The product
A Personal Finance Manager โ record transactions, categorize them, and answer real questions: what did I spend, on what, and what remains?
Features (graded subset marked โ )
- โ Record a transaction: name, category, amount (positive = income, negative = expense).
- โ Validate at the boundary: empty name rejected, zero amount rejected.
- โ Balance: sum of all amounts.
- โ
By category: per-category totals (
map<string,double>). - Filter: transactions above/below a threshold.
- Persistence: save/load CSV lines (
name,category,amount) โ module 6's parser in production. - Report: sorted summary printed via
void program().
Architecture constraints
- A
Transactionstruct; anenum class Kind { Income, Expense }derived from the sign. - A class
Ledgerowning astd::vector<Transaction>โ its methods enforce validation (module 10's invariant discipline). - Parsing/formatting as free functions (module 16's pipeline), not glued into
Ledger. - No
new/deleteanywhere (module 12), no C-strings, nousing namespace std;in headers.
Milestones
M1: struct + Ledger with record/balance. M2: category totals + filter. M3: CSV save/load round-trip. M4: report via program(). Ship each milestone working โ the graded checks map to M1โM3 exactly.
Acceptance (the tests' point of view)
The graded challenges call your names directly: add_record, balance, category_totals, plus a program() report check. Edge cases are graded: the empty ledger, the rejected record, the single-category month. Design for them from line one.