ISSUES IN SOLUTION
Students are sometimes surprised to find that the initial velocity has no bearing on the optimal angle in problems 1 and 2.
The more pragmatic students may want to take into account the thickness of the wall, the size of the cannonball, and air resistance.
While the wall and the cannonball do not add to the complexity of the problem, air resistance does. This problem can be revisited later when the students have sufficient familiarity with differential equations to incorporate air resistance.
^*)