Java
OOP GUIDE / WORK
COLLIDABLE INTERFACE
Topics
· Interface design
TASK – PART 1 – INTERFACE DESIGN
Below is a possible solution. Of course, there are many different possible answers that could work here.
public interface Collidable
{
public Rectangle getBoundingBox();
public boolean contains(Point p)
public int left();
public int right();
public int top();
public int bottom();
}