Checkpoint: ShoppingCart from a spec table
Challenge on lesson: Checkpoint: ShoppingCart
CHALLENGE
Difficulty: intermediate+25 XP
Build the full ShoppingCart class from its spec table: addItem tracks total, count, AND the last price; refundLast undoes the most recent item (empty cart โ false, nothing changes); readers given. The last-price memory is one extra field โ the spec permits it.
Press Submit to check your solution.
Back to lesson: Checkpoint: ShoppingCart