1. After replacing the switch statement, what is the value of xCenter when the switch finishes execution and numberOfTimes is
a. 5
b. 2
2. Consider the class RandomPoint. Define each of the following methods for this class:
a. toString
b. equals
3. Define the class HorizontalLine.
4. Suppose that lineA and lineB are two instances of the class VerticalLine, and aPoint is an instance of the class RandomPoint. Write some code that decides whether aPoint lies between—but not on—the two vertical lines.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here