Question: Pls solve this pacman code in JAVA and with NO classes. Only ONE class which Is the main one. Also pls use arrays. Putput: Make

Pls solve this pacman code in JAVA and with NO classes. OnlyPls solve this pacman code in JAVA and with NO classes. Only ONE class which Is the main one. Also pls use arrays.

Putput: Make a Packman program. Follow the instructions below. Declare a two-dimensional char array with 5 rows and 5 columns and initialize every element with the * symbol using a nested for loop. Create two int variables x and y to indicate the current position and use the @ symbol as the current position in the program. Let x represent the row index and y represent the column index. Let x be 2 and y be 0 at the beginning. Use a loop to move around until there are less than 50% of * remaining. Repeat the following process in the loop until the conditional expression is satisfied: - Display the current state of the two-dimensional char array using a nested for loop. - Move one space at a time. Move up, down, left, or right randomly. Do not move diagonal, teleport, or reach outside of the boundaries. - Update the previous location with a space. - Update the current position with a @symbol

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!