Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Project Race names: Thursday March 1 (Duplicate Character games output on my website)The game will use the random number generator of the Math class to

image text in transcribed
image text in transcribed
Project Race names: Thursday March 1 (Duplicate Character games output on my website)The game will use the random number generator of the Math class to repeatedly assign to each name a number. These numbers are used by the names to move closer to the finish line. (You can decide the range of the numbers.) Use the code Thread.sleep(1000); to stop the program for a short time as it runs. The argument is in milliseconds. 1000 is one second. By carefully adjusting the number of "In", the movement of the names appear to move in a race. I used 7 methods. Here are some additional comments on the NameRace0 class: 1) You do not need to name it NameRace. I did not call it that but it would make a good name for the class The DescriptiveName class that I gave as an example gives an outline for this game a) There is a public method that is called from the GamesDemo class when this game is picked from the menu. Give this method a name appropriate for the Name Race game b) There is an introduction method describing the game. I give the text that you can use on my web site. You do not need to use my text but it should be descriptive of the game c) There is a while loop that allows the player to continue playing this game d) There are other methods in this class that are used. These methods break the code up into logical segments and can be called from the public method to run the code e) My solution has about 130 lines of code. There are 5 helper methods besides the introduction method that are called to run the game. These are private as is the introduction method. You must understand what the program is to do. From my output on my website it is hard to see how the game would look. When this game is run the names appear to move from left to right. This involves the String methods making it appear that the three names are moving. The three names move as a group. After each group move I figured out th 3) mber of calls to Sysyem.out.println0 to make it appear that the names stayed in the same place on the screen. I demonstrate this in the introduction method of the menu class. It looks like this: System.out.println Here is a most basic algorithm a) print introduction 4) Within a loop, allow the client to race as many races as he wishes Project Race names: Thursday March 1 (Duplicate Character games output on my website)The game will use the random number generator of the Math class to repeatedly assign to each name a number. These numbers are used by the names to move closer to the finish line. (You can decide the range of the numbers.) Use the code Thread.sleep(1000); to stop the program for a short time as it runs. The argument is in milliseconds. 1000 is one second. By carefully adjusting the number of "In", the movement of the names appear to move in a race. I used 7 methods. Here are some additional comments on the NameRace0 class: 1) You do not need to name it NameRace. I did not call it that but it would make a good name for the class The DescriptiveName class that I gave as an example gives an outline for this game a) There is a public method that is called from the GamesDemo class when this game is picked from the menu. Give this method a name appropriate for the Name Race game b) There is an introduction method describing the game. I give the text that you can use on my web site. You do not need to use my text but it should be descriptive of the game c) There is a while loop that allows the player to continue playing this game d) There are other methods in this class that are used. These methods break the code up into logical segments and can be called from the public method to run the code e) My solution has about 130 lines of code. There are 5 helper methods besides the introduction method that are called to run the game. These are private as is the introduction method. You must understand what the program is to do. From my output on my website it is hard to see how the game would look. When this game is run the names appear to move from left to right. This involves the String methods making it appear that the three names are moving. The three names move as a group. After each group move I figured out th 3) mber of calls to Sysyem.out.println0 to make it appear that the names stayed in the same place on the screen. I demonstrate this in the introduction method of the menu class. It looks like this: System.out.println Here is a most basic algorithm a) print introduction 4) Within a loop, allow the client to race as many races as he wishes

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Define Scientific Management

Answered: 1 week ago

Question

Explain budgetary Control

Answered: 1 week ago

Question

Solve the integral:

Answered: 1 week ago

Question

What is meant by Non-programmed decision?

Answered: 1 week ago