The goal of this problem set is to practice the use of existing abstractions.
21.2.1, 21.2.2, 21.2.3
Edit your UFO project once again. Be sure to fix any and all problems that
your graders have discovered in your test suite.
Next, you are to use "loops" wherever your functions may benefit from
them, especially for the lists of objects in your project.
Since you have a new partner, you actually have two different homework
from which you can start. You are free to choose whichever one you like
best. You must turn in your marked up copy with the cover page to get any
credit for this problem.
Explanation: A good "manager" will help you improve your code in this
manner. So imagine we (the course staff and you) are in a start-up and we
don't want to waste money with program code that is difficult or
impossible to maintain. Your "manager" played "copy editor" (look it up if
you don't know what this means) and you're now removing typos.
Problem 9.A2 asked you to design a function that
generates all (leafy) binary trees of some given height. An elaborate
solution is now on-line and awaiting for your
Rewrite the solution using "loops" wherever your functions may benefit
from them, especially for the lists of objects in your project. Do not use
loops when it isn't appropriate.
Challenge: Also, abstract over the "traversal" of
natural numbers, which is performed in