Question
19FA_INFO_1521_WW Java Programming I Java Flea Circus Assignment Overall understanding: The Flea Circus Program will start with a 30 x 30 grid and one flea
19FA_INFO_1521_WW Java Programming I Java Flea Circus Assignment
Overall understanding: The Flea Circus Program will start with a 30 x 30 grid and one flea in each square. The purpose of the program is to have each flea jump one time per bell ring to an adjacent square. After each Round, the program will then calculate and display the total number of unoccupied squares. A Round is the number of rings of the bell the user has chosen. So, if the user chooses 500 bell rings, a Round is all 500 bell rings.
Responsibility at a high level:
- Users input/responsibility
- Start program
- Provide program with Number of bell rings
- Review results
- Programs responsibility
- Display the menu()
- Make the required number of bell rings by jumping fleas
- Display the required output after each round
- Reset everything before the next round
Program Requirements:
- You must use your Validator class to get any entries and all random numbers
- Your heading is also a required addition and it must include the date like I did in the ClassClockDateSolution, SchuettHeading
- You must use arrays. I say arrays because there will end up being more than one
- The Main() that runs the whole program is in the FinalProgram class
- The Menu() is in the FinalMenu class and the Menu() will display your heading each time it displays the menu and it must include the date
- The rest of the functions, aside from the ones already defined above, will be in the FleaProject class
- If youre adding things up there are 5 classes and each one is in its own file
- The user will be prompted to enter any number of bell rings with the only restriction being that it has to be a positive whole number between 1-100,000 (using the menu() function which uses the Validator function)
- There are several constants(final) variables that need to be created and used
- The program will then begin the first bell ring and as many as the user has chosen
- Flea Jump Rules:The program will repeat ringing the bell until it has completed the number of rings selected by the user which is called a round
- Each flea can only jump to an adjacent square
- A flea must jump to a different square than it resides in
- Each flea can jump only once per ring
- A flea cannot jump diagonally
- A flea may jump either up, down, left or right
- A fleas jump direction is based on a random number generated for each flea at the time of the jump
- A flea may not jump off the grid
- The program will repeat ringing the bell until it has completed the number of rings selected by the user which is called a round
- A Round is the number of rings of the bell the user has chosen. So, if the user chooses 500 bell rings, a Round is all 500 bell rings
- After a Round, the program will calculate and displayAfter a Round has been completed, the program will reset, be ready to start over and display the menu()
- The total number of unoccupied grid spaces
- Which grid space has the most fleas in it. You may have to list several locations if there are some with the same number in it
- After a Round has been completed, the program will reset, be ready to start over and display the menu()
- The user will then be given the opportunity to end the program after any round
- The program will then display Thank You for Playing to the user
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started