Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

  1. Users input/responsibility
    1. Start program
    2. Provide program with Number of bell rings
    3. Review results
  2. Programs responsibility
    1. Display the menu()
    2. Make the required number of bell rings by jumping fleas
    3. Display the required output after each round
    4. Reset everything before the next round

Program Requirements:

  1. You must use your Validator class to get any entries and all random numbers
  2. Your heading is also a required addition and it must include the date like I did in the ClassClockDateSolution, SchuettHeading
  3. You must use arrays. I say arrays because there will end up being more than one
  4. The Main() that runs the whole program is in the FinalProgram class
  5. 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
  6. The rest of the functions, aside from the ones already defined above, will be in the FleaProject class
  7. If youre adding things up there are 5 classes and each one is in its own file
  8. 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)
  9. There are several constants(final) variables that need to be created and used
  10. The program will then begin the first bell ring and as many as the user has chosen
  11. 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
    1. Each flea can only jump to an adjacent square
    2. A flea must jump to a different square than it resides in
    3. Each flea can jump only once per ring
    4. A flea cannot jump diagonally
    5. A flea may jump either up, down, left or right
    6. A fleas jump direction is based on a random number generated for each flea at the time of the jump
    7. A flea may not jump off the grid
  12. The program will repeat ringing the bell until it has completed the number of rings selected by the user which is called a round
  13. 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
  14. 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()
    1. The total number of unoccupied grid spaces
    2. 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
  15. After a Round has been completed, the program will reset, be ready to start over and display the menu()
  16. The user will then be given the opportunity to end the program after any round
  17. 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

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_2

Step: 3

blur-text-image_3

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

Oracle Database 19c DBA By Examples Installation And Administration

Authors: Ravinder Gupta

1st Edition

B09FC7TQJ6, 979-8469226970

More Books

Students also viewed these Databases questions