Skip to main content

Checkpoint: BonusAccount

Challenge on lesson: Checkpoint: override with state

CHALLENGE
Difficulty: beginner+25 XP

Complete BonusAccount extends Account: chain the constructor up, keep a private deposit counter starting at 0, and override deposit(amount) to count the deposit and then perform the normal deposit (reusing the superclass method).

Back to lesson: Checkpoint: override with state