Build cart amount calculation. The total is the sum of (unit price × quantity) for every item, and the discounted amount applies a 10% discount to the total, rounded to whole won (HALF_UP). Complete Money.
Complete a plain-Java (no framework) Money value object that calculates cart amounts. The total is the sum of unit price × quantity, and the discounted amount applies a 10% discount to the total, rounded to whole won. You practice verifying that money math stays exact across every case.
Money calculation is an area where the result must not be off by a single won. So it matters to state clearly in code how numbers are held and computed, and when and by what rule rounding happens. This problem practices computing the total (the sum of unit price × quantity) and the 10% discount exact to the won, and verifying that the total and the discounted amount come out correct.