Question: Note: The language is beginners java but this assignment is lengthy. The purpose is to create a loop for this mouse which counts the number

Note: The language is beginners java but this assignment is lengthy. The purpose is to create a loop for this mouse which counts the number of steps it takes as well as the specific direction for each of the steps. They are generated randomly. Also, once the mouse passes a specific border, there are different situations for the mouse, which will involve if/if else or switch. If someone is willing to do this, I will be very appreciative.

Thank you

Note: The language is beginners java but this assignment is lengthy. The

purpose is to create a loop for this mouse which counts the

number of steps it takes as well as the specific direction for

Objective: Objective of this HW is to use loops. In this HW assignment, you will be implementing a mouse game. There is a little mouse on an island which is connected to the main land with several bridges. After N(at most) random steps, the mouse will escape from the island, or will be stuck in the island, or will end up in the water surrounding the island. The following picture is depicting the island. The island is 14 by 14 unit square. The bridges (bold small lines) are indicated by points: [0,7].17,7],[7,01,17,- 7],[0-7],[-7,-7].[-7,0], and [-7,7]. There are a total of 8 bridges. 1-7 [0,7] 17,7 1-7,0] 17,0] 7,-7] [0,-71 A little mouse is sitting at position [0,0]. This place will be represented by two integer variables x and y. So intially x=0 and y-0 are indicating [0,0] as the starting position. The mouse will take one step a time. These steps can be To the right(R) / can be indicated by integer 0 To the left() // can be indicated by integer l To the up(U) can be indicated by integer 2 or To the down(D) can be indicated by integer 3 The mouse will take these steps randomly. For example, assume the mouse is allowed to take N-5 steps and these 5 steps are: Right, Right, Left, Up, and Right (RRLUR). So the mouse is intially at the starting point x=0 and y=0, after the first step, its position will be x=1 and y=0. After the second step which is to the right, the mouse will be at x=2, 0 After the 3rd, 4th, and 5th step the mouse will be at x-2,y indicated by [2,1]. Objective: Objective of this HW is to use loops. In this HW assignment, you will be implementing a mouse game. There is a little mouse on an island which is connected to the main land with several bridges. After N(at most) random steps, the mouse will escape from the island, or will be stuck in the island, or will end up in the water surrounding the island. The following picture is depicting the island. The island is 14 by 14 unit square. The bridges (bold small lines) are indicated by points: [0,7].17,7],[7,01,17,- 7],[0-7],[-7,-7].[-7,0], and [-7,7]. There are a total of 8 bridges. 1-7 [0,7] 17,7 1-7,0] 17,0] 7,-7] [0,-71 A little mouse is sitting at position [0,0]. This place will be represented by two integer variables x and y. So intially x=0 and y-0 are indicating [0,0] as the starting position. The mouse will take one step a time. These steps can be To the right(R) / can be indicated by integer 0 To the left() // can be indicated by integer l To the up(U) can be indicated by integer 2 or To the down(D) can be indicated by integer 3 The mouse will take these steps randomly. For example, assume the mouse is allowed to take N-5 steps and these 5 steps are: Right, Right, Left, Up, and Right (RRLUR). So the mouse is intially at the starting point x=0 and y=0, after the first step, its position will be x=1 and y=0. After the second step which is to the right, the mouse will be at x=2, 0 After the 3rd, 4th, and 5th step the mouse will be at x-2,y indicated by [2,1]

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!