Skip to main content

Practice · 1 of 5

State machine from a spec

CHALLENGE
Difficulty: intermediate+25 XP

Complete TollBooth: constructor sets cars = 0, cash = startingCash. carPasses() adds one car and 2 cash, returning 2. Getters are given.

Back to lesson: Practice: Object workshop