GameControl solution

$14.99

Original Work ?

Download Details:

  • Name: GameControl.zip
  • Type: zip
  • Size: 10.05 KB

Category: You will Instantly receive a download link upon Payment||Click Original Work Button for Custom work

Description

5/5 - (1 vote)

Make a complete Java program called GameControl according to the following guidelines.

This program must use a do loop to provide the following interaction with a user.

The program should prompt for an integer from 1 through 4, or q to quit.

If a user enters 1, your program should print “Up” and then prompt the user to enter another integer from 1 through 4, or q to quit.

If a user enters 2, your program should print “Down” and then prompt the user to enter another integer from 1 through 4, or q to quit.

If a user enters 3, your program should print “Left” and then prompt the user to enter another integer from 1 through 4, or q to quit.

If a user enters 4, your program should print “Right” and then prompt the user to enter another integer from 1 through 4, or q to quit.

If a user enters q, your program should print “Terminating on receiving input q” and quit