The first picture is the homework that I have to.
The second picture is last homework according to the first picture.
I have to use the functions that are mentiond in the second picture such as enum function.
The third and fourth pictures are codes that I did on the second picture assignment.
Please do my homework that is instructed in the first pictures
Homework 1-Robot in Maze Upload your java file to Canvas, and be prepared to run your code for the TA in class on the due date. Create a robot that moves through your maze. The robot makes random moves up, down, left, and right. It can only see locations that are directly adjacent to its current location. After each move, display the robot in the maze, the number of moves so far, and pause for a moment. Here is an example display. X represents the robot: Move number 138 Begin this homework with your code for the Display Maze lab. Add an array robotPosition] of two integers to store the current row and column of the robot Add a method to determine the new robot position after each random move: public static void randomMovel Values maze()0, int robotPosition)) Use this code to pause the program 1000 milliseconds between each robot move try f Thread.sleep(1000); / catch (interruptedException e) 0 To clear the screen prior to displaying the maze, print 50 blank lines. OPTIONAL (1 bonus point) Make your robot 'smarter, so that it escapes the maze faster. For example, you can give your robot a memory. Ask the user to select 'dumb' or 'smart' robot before each run. Display Maze Lab Write a program that creates and displays a 10 by 10 maze. Here is an example of a maze display: This is just an example. Create a different maze for your program. Use this starter code: public class DisplayMaze ( // represent elements of maze array with enumerated data type Values enum Values (SPACE, WALL, ESCAPE public static void main( String!] args ) f // maze[Ill stores walls, spaces, and exits of maze Values mazell-new Values[10J[10]; // your code here //initializes maze public static void createMazef Values maze[Il]) // your code here // displays maze public static void showMazef Values mazelI )f //your code here I// end of DisplayMaze File Edit Format View Help import java.util.Random public class DisplayMaze ( enum Values ( SPACE, WALL, ESCAPE public static void main(Stringl] args) values maze[][] = new Values[10] [10]; createMaze(maze); showMaze(maze); public static void createMaze (Values mazell) ( Random random - new Random(); for (int i -0; i " maze.length 1) { i maze.length 2; O Type here to search ayMaze-Notepad t Format View Help ) else if (dir1) ( ) else if (dir 2) ) else // left /I down 1 if (i >= maze. length - 1) { if (J1) if (jmaze[i].length 1) ( if (i escape2 && jmaze[.ngt i-mazelength - 2; j -1 d -maze[4).length 2 2) ( maze[1]I3] - Values.SPACE; donetrue ; // method to show the maze public static void showlaze(Values maze[]I) ( for (int i-0; i