Skip to main content
๐Ÿ“œ WAYPOINT LESSON

Checkpoint โ€” Monthly statement

โญ beginnerโณ 25 min read๐Ÿ“ Lesson 85 of 85

The capstone deliverable: a monthly statement with signed totals, the dominant category, and the top entries.

Checkpoint: the monthly statement

Task: implement in Solution:

  1. static Statement MonthStatement(List<Transaction> ledger, int year, int month) โ€” statement for the transactions in that calendar month; Income/Expense are signed totals (income positive, expenses as their amounts), Balance = Income โˆ’ Expense, and Top holds at most 3 descriptions of that month's transactions ordered by amount descending (ties in stable ledger order). A month with no transactions yields zeroed totals and an empty Top.
  2. Supporting type public record Statement(decimal Income, decimal Expense, decimal Balance, List<string> Top); may be declared inside Solution or alongside it.