Question: JAVA PROGRAMMING on start the user is asked for the number of rows and columns, then the Grid object is instantiated using the values from
JAVA PROGRAMMING


on start the user is asked for the number of rows and columns, then the Grid object is instantiated using the values from the user and in the constructor for Grid the currentRow and currentColumn are randomly set. In a sentinel controlled loop display the current location to the user by using the getcurrentRow() and getCurrentColumn0 from the object. Get a string command from the user If the command is N or n, call the .goNorth() method from the object else if the command is s or s, call the .goSouth0 method from the object else if the command is E or e, call the .goEast() method from the object else if the command is w or w, call the .goWest() method from the object else if the command is Jor j, call the jump method from the object (Extra credit 5 points) else if the command is Q or q, display a good bye message saying the row/column where the user exited the program else indicate the command is invalid Extra Credit Items Driver validation check on numRows entered by the user to make sure o(5 points validation check on numcolumns entered by the user to make sure >o (5 points) calling jump method (5 points) Extra Credit Items Grid class jump method (5 points)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
