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.
Press Submit to check your solution.
Back to lesson: Practice: Object workshop