C script project - C programming language

Znex56

Programming

Question Description

Hi ,,

I have a project to create a C script that will find the path for princess PEACH. Please read through all the project description attached first.

Basically, the mazes are multi dimensional arrays. The code has to work with any maze. It will be tested using the 6 mazes provided in the file in addition to other mazes ( arrays).

For example, to create the maze, it will be in this format :

int a[3][4] = {{0, 1, 2, 3} ,/*  initializers for row indexed by 0 */{4, 5, 6, 7} ,/*  initializers for row indexed by 1 */{8, 9, 10, 11}/*  initializers for row indexed by 2 */ };

However, the array has to consists of rows and columns.

To get a good idea about the output, please look at the last page in the project description. The user has to input the locations of princess and mario, then the program will point out all the turns she made to avoid all the fives. Also, the program at the end will point out the junctions. The junction is where the princess encounter the junction which leads to more than one path.

The PseudoCode for this project is due 4 days after the tutor gets assigned to the question. ( please see requirements for the PseudoCode in the project description).

Once you are finished with the project, please give me couple paragraphs explaining the following :

1- the PseudoCode

2- the process of the code

3- how the code works based on the given PseudoCode

What should be used in this project is C language with only the following concepts :

( input and output ,loops, array, user defined functions ( C preprocessor, Macros, and header file.) )

Please don't go beyond these concepts in creating the script.

Please read the project description carefully, and ask me if you have any questions.

Thank you very much ,,

Unformatted Attachment Preview

TAKE HOME PORTION OF EXAM 2. 60% of your grade for the second exam will be decided by this take home portion of the exam. It is a multistage task. Please follow the instructions on the submission deadline carefully. STAGE 1: PseudoCode BOTH HARDCOPY SHOULD BE AND SOFTCOPY TURNED IN! STAGE 2: . STAGE 3: Coverage 35% of the Take home. PseudoCode should be well detailed in order to explain every possibility on decision making process, outcome, repetition, and etc. in order to achieve the goal. 35% of the Take home Script that can handle Array 1 and 2. Use user defined functions on choosing paths when Peach encounters a junction that lead to more than one path. 30% of the Take home Script that can handle Array 1 to 6. Use user defined functions on choosing paths when Peach encounters a junction that lead to more than one path. Also, add conditions that will exclude paths that had led to dead ends when the processor REVISITs to same junction to choose different paths. Submit by 5:00 pm March 19th HARDCOPY YES - TO the instructor or Department Office SOFTCOPY YES - On Canvas 11:59 pm March 26th No YES – On Canvas 11:59 pm Apr 9th No YES – On Canvas For the PSEUDOCODE, Your Instructor will grade your PseudoCode. It can be written form or graphical representation by using flow chart. Neither hand written nor hand drawns will be accepted. THOSE HAND WRITTEN OR HAND DRAWNS WILL GET ZERO AUTOMATICALLY. Save Mario NOT Princess PEACH. (Yes, this is 21st century.) Objective: Create a C script that will find a path that your heroine, Princess Peach may travel to save Mario. How it works 0. The user should be prompted to type in the Cell locations of the Entrance (for Peach) and of the Exit (Where Mario’s cage is placed.) Entrances are on the first row (Regardless of column number) or the first column (Regardless of the row number) while Exits are on the last row (Regardless of column number) or the last column (Regardless of the row number). (I.E. For the Maze_Array on the previous page, (1,3) should be used for the Entrance and (8,22) should be used for the Exit.) 1. 5 cells in the array indicate brick wall that she cannot cross. Remember, she is “Princess Peach” not “Ralph” from “Wreck it, Ralph”! 2. 0 cells with no walls in the array indicate safe passages that Peach can travel. 3. With each iteration, Princess Peach can move forward, backward, upward, downward, to the right, or to the left by one cell. 4. When she faces a dead end, she needs to go back and take a different path. 5. The Princess cannot see the whole design of the Maze. She does not know how paths are connected. Neither do you. (in other words, YOU cannot assist Peach with “Choosing the right PATH” – Your job is creating “user defined functions” based on logic for her to use.) 6. Repeat the steps 3 and 4 until she finally saves Mario. 7. Your final script will be tested with different Maze_Array that you will not find on this assignment set. 8. Create 7 minutes Youtube video that will explain the process – 1). Your Pseudocode. 2). How your script works based on your Pseudocode. 3). Upload and send the link to the instructor and TAs by 11:59 pm Apr 9th. Maze_Array1 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 0 0 0 0 0 0 0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 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 Maze_Array6 5 5 0 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 0 5 5 5 5 5 5 0 0 0 5 0 0 0 0 5 5 5 5 5 0 5 5 5 5 5 5 0 5 5 5 0 5 5 0 5 5 5 5 5 0 5 5 5 5 5 5 0 5 5 5 0 5 5 0 5 5 5 5 5 0 5 5 5 0 0 0 0 0 0 5 0 5 5 0 5 5 5 5 5 0 5 5 5 0 5 5 0 5 5 5 0 5 5 0 5 0 5 5 5 0 5 5 5 0 5 5 0 0 0 0 0 5 5 0 5 0 5 5 5 0 5 5 5 0 5 5 5 5 5 5 5 5 5 0 0 0 5 5 5 0 5 5 5 0 5 5 5 5 5 5 5 5 5 0 5 0 5 5 5 0 5 5 5 0 5 5 5 5 5 5 5 5 5 0 5 0 5 5 5 0 0 0 0 0 5 5 5 5 5 5 5 5 5 0 5 0 5 5 5 5 5 5 5 0 5 5 5 5 5 5 5 5 5 0 5 0 5 5 0 5 5 5 5 0 5 5 5 5 5 0 0 0 5 0 5 5 5 5 0 5 5 5 5 0 5 5 0 0 0 5 0 5 5 0 5 5 5 5 0 5 5 5 5 0 5 5 0 5 5 5 0 5 5 0 5 5 5 5 0 0 0 0 0 0 0 0 0 0 0 5 0 5 5 0 5 5 5 5 0 5 5 5 5 0 5 5 0 5 5 5 0 5 5 0 0 0 0 5 0 5 5 5 5 0 5 5 0 0 0 0 0 5 5 5 5 5 5 5 0 5 5 5 5 0 5 5 5 5 5 5 0 5 5 5 5 5 5 5 5 5 5 5 5 0 5 5 5 5 5 5 0 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 ...
Purchase answer to see full attachment
Student has agreed that all tutoring, explanations, and answers provided by the tutor will be used to help in the learning process and in accordance with Studypool's honor code & terms of service.

Final Answer

At...

pevff53 (3339)
Carnegie Mellon University

Anonymous
I was struggling with this subject, and this helped me a ton!

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4
Similar Questions
Related Tags