๐ 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:
static Statement MonthStatement(List<Transaction> ledger, int year, int month)โ statement for the transactions in that calendar month;Income/Expenseare signed totals (income positive, expenses as their amounts),Balance = Income โ Expense, andTopholds 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 emptyTop.- Supporting type
public record Statement(decimal Income, decimal Expense, decimal Balance, List<string> Top);may be declared insideSolutionor alongside it.