Homework #3: Java Programming (Due by 11:59pm on April 20, Wednesday ) 1. Purpos
ID: 3693816 • Letter: H
Question
Homework #3: Java Programming
(Due by 11:59pm on April 20, Wednesday )
1. Purpose of the programming : [Implementing a Java program that solves a maze]
Maze is an exciting puzzle game whose goal is to find the path from a starting position (S) to an end position (E ).
2. Important functions for the program
(1) Reading a maze file
o After reading a maze file, the program executes finding a path of the maze.
o The format of a maze file is like the following:
- The number of rows : 8
- The number of columns : 8
- - The map of the maze (# : wall, ‘ ‘ : the road, S: a starting point, E: an ending point
(2) Finding the path from S to E on a given maze
o After receiving information related to direction from a user, the program executes to find the path to the position E.
o The command that a user provides to the program has the following format. direction the amount of movement
- Direction
r: rightward, l: leftward, u: upward, d:downward
- The number of movements: a positive integer.
- Example
r 3 : moves 3 columns to the right u 2 : moves 2 rows upward
(3) Iterative execution based on menu.
o Once the program starts, it shows a menu showing 1) Read a maze file, 2) Show the current maze map, 3) Start the game, 4) Exit. If one game ends, the program repeats this process until a user chooses ‘Exit’.
Explanation / Answer
It might generate some syntax errors.. i haven't got the time to compile it.please do try it.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.