The post lab 1 assignment requires collision detection that is
more sophisticated than what you developed in lab. Specifically,
it is not sufficient to determine if two sprites intersect, but
rather it is necessary to determine which edges of two sprites
intersect. In order to determine which edges intersect, it is
useful to have helper methods that return the amount that an edge
overlaps with another sprite. For this assignment write a method
that returns the amount (in pixels) that the top edge of a sprite
object overlaps with another sprite. Note that if the specified
sprite does not intersect with the top of this sprite, then
positive infinity should be returned. Complete
the topOverlap
method in the
file Sprite.java.
Submission: Submit your code as a zip file with your name as the zip file name on the course Inquire site.