Skip to main content

Practice · 3 of 3

Capstone: the account

CHALLENGE
Difficulty: beginner+25 XP

Implement both mutators to spec: deposit adds only positive amounts and returns the new balance; withdraw succeeds only if the balance covers it, returning true/false and leaving state unchanged on failure.

Back to lesson: Practice: Readiness reps