Back to problems

Expense System

Object-Oriented Programming · Rippling · Medium

Direct Evaluation — Check Every Expense Against Every Rule When both the number of expenses and the number of rules are small (at most 100 each), we can afford to take the simplest correct approach: for each expense, test it against every rule and collect the identifiers of any violated rules. The work splits naturally into three steps: Parse the raw 2D string lists into domain objects. This turns index‑based field access into readable property lookups and allows us to…

Checking your access…