Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

at the received row and seat location to the received player value (a ' 1 ' or a ' 2 ') OR, when found, sets

image text in transcribed

image text in transcribed

image text in transcribed

at the received row and seat location to the received player value (a ' 1 ' or a ' 2 ') OR, when found, sets the myWinner field to the current player AND sets myFound to true. toString displays the current myAuditorium array and it's contents EXCEPT the location of Waldo which remains hidden until he is found at which point toString will be called (by the driver) and both the player who found Waldo and a 'W' will be displayed in the same cell.... NOW, and perhaps the awkward portion of the toString output. Normally, when displaying a 2D array, the [0][0] cell is displayed in the upper left corner as with matrices. However, because Waldo has (row A) displayed to the right, second row (row B) to the left of row A, and so on... The seat locations (columns) within a given row are displayed from top to bottom. To save words, look closely at the sample run provided on the next page. The output of your auditorium should look identical to what is seen in the sample run on page 4 below. (The driver program PlayWaldoGame.java, randomly chooses which player should begin) DUE: See Canvas Programming Assignment 1 link. (Zip ONLY your WherelsWaldo.java file in a zipped folder named Programming1.zip and submit Programming1.zip to Canvas by the due date. DO NOT zip any other files or folders inside Programming1.zip) For ALL programming assignments remember to obey all rules pertaining to Academic Integrity listed in the syllabus (DO NOT share code, DO NOT use other people's code, DO NOT post your solution on the internet). A sample run based on the criteria above is listed on pages 4-6: (Follow the Documentation Requirements as listed in the PDF file on Canvas). SAMPLE RUN -1-jGrasp exec: java PlaywaldoGame To find Waldo, we need to know: How many seats are on each row Please enter the number of rous: 4 Please enter the number of seats on each row: 3 Rows start at A and seats start at one '1' Player 1, enter row letter and seat number to search separated by a space: D 3 Player 2, enter row letter and seat number to search separated by a space: B 1 Player 1, enter row letter and seat number to search separated by a space: B 3 Player 2, enter row letter and seat number to search separated by a space: A 1 Player 1, enter row letter and seat number to search separated by a space: A 2 Player 2, enter row letter and seat number to search separated by a space: D 1 Player 1, enter row letter and seat number to search separated by a space: Great job player 1! Would you like to find Waldo again [Y/N]? Y To find Waldo, we need to know: How many rows are in the auditorium How many seats are on each row Please enter the number of rows: 6 Please enter the number of seats on each row: 5 Rows start at A and seats start at one '1' Player 2, enter row letter and seat number to search separated by a space: F1 Player 1, enter row letter and seat number to search separated by a space: A 3 Player 2, enter row letter and seat number to search separated by a space: B 1 Player 1, enter row letter and seat number to search separated by a space: B 5 Player 2, enter row letter and seat number to search separated by a space: C 3 Player 1, enter row letter and seat number to search separated by a space: F 5 Great job player 1! Would you like to find Waldo again[Y/N]? n ---jGRASP: operation complete

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

Database Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

3rd Edition

0760049041, 978-0760049044

More Books

Students also viewed these Databases questions

Question

3. Describe at least two features of wise reasoning.

Answered: 1 week ago

Question

10. What is meant by a feed rate?

Answered: 1 week ago