Class Participation Exercise 9
Translations: enClass Participation Exercise 9
Consider a Rect class to represent a rectangle in a two-dimensional integer plane.
public class Rect {
...
// create rectangle with given corners
public Rect( Point topLeft, Point botRight ) { ... }
// return true iff point p is in or on this rectangle
public boolean encloses( Point p ) { ... }
}
Depict a thorough set of test case equivalence classes for the encloses method, also indicating the expected results. Add explanatory text as needed for analogous or unusual cases. State any assumptions.
Do not implement the method. Do not write test code. Do not use JUnit.