This is a bonus program! It's meant to be challenging. This program is an exercise in debugging. Some buggy code is written for you (the program does not run correctly), and it is up to you to fix it.

Karels first large assignment is to walk across KoƧ campus and spruce it up a bit for Spring. Spring has sprung, but the campus trees haven't gotten the memo and are still leafless. Karel needs to walk across campus from west to east, adorning all trees with artificial leaves and transforming the campus as follows:

The problem is complicated because Karel doesn't know how tall each tree is, nor does she know the distances between trees. She does know, however, that she has just enough beepers in her beeper bag starting out to decorate all of the trees. You can likely intuit the program requirement by looking at the two snapshots above (the world is called BanishWinter1.w. Your program must therefore also work for the following configuration (BanishWinter2.w):

The file Day1/BanishWinter.java has some code to get you started, but it is buggy and incorrect. Try to understand what the errors are in the code and debug the program.