Title: Java: UML in Object-Oriented Programming
Instructions: Provide the Java code as your analysis and solution to the following problems.
1. Input a number value for LEFT, RIGHT, and X. If LEFT is greater than RIGHT, display the first ten numbers in descending order starting from X. If RIGHT is greater than LEFT, display the first ten numbers in ascending order starting from X. If RIGHT and LEFT are equal, display "Equal Value". Use the UML diagram below as a guide. The following methods are as follows:
CountMe
testACountMe
- X: int
- RIGHT: int
- LEFT: int
+ setValues(int, int, int): int
+ displayCount(int): void
setValues(int, int, int) - accepts the value for X, LEFT, and RIGHT as parameters and returns the following:
- 0 if LEFT and RIGHT are equal
- 1 if LEFT is greater than RIGHT
- 2 if RIGHT is greater than LEFT
displayCount(int) - accepts the integer that represents the status of RIGHT and LEFT, and then displays the expected result.