November 2016
Intermediate to advanced
480 pages
14h 42m
English
There is currently a bug in the Zombie type. If an instance of Zombie terrorizes a town with a population of 0, then its population will decrement to -10. This result does not make sense. Fix this bug by changing the terrorizeTown() method on the Zombie type to only decrement the town’s population if its population is greater than 0. Also, make sure that the town’s population is set to 0 if the amount to decrement is greater than the current population.
Read now
Unlock full access