Skip to main content

Capstone: the personal ledger

Challenge on lesson: Checkpoint: The Personal Ledger

Finish the Ledger class. net(datePrefix) = sum of amounts with sign by direction, counting only transactions whose date starts with the prefix (use "" for all). labelsSince(datePrefix) = labels of matching transactions, in insertion order, uppercase. saveLines() = every transaction rendered as date|label|DIRECTION|amount with exactly two decimal places, insertion order. loadLine(line) = parse one saved line and add it - but a malformed line must not corrupt the ledger: skip it silently if it fails the record's validation.

Difficulty: advanced

Back to lesson: Checkpoint: The Personal Ledger