Answered step by step
Verified Expert Solution
Question
1 Approved Answer
What to Hand In Usually this appears last, but in this question, it s first so that you know what you have to hand in
What to Hand In
Usually this appears last, but in this question, its first so that you know what you have to hand in As you
can see, the code you develop is a small part of this work.
Your plan to complete this question: aqplan.txt
Your design document: aqdesign.txt
Your answers to the reflection questions: aqreflections.txt
Your Python program aqpy
You must use TXT file type for this question. Be sure to include your name, NSID, student number, course
number and lecture section at the top of all documents.
IMPORTANT: All of your Question files should be committed to Git, see Question for details!
Problem Specification
After numerous Godzilla attacks, the city of Tokyo, Japan is testing their new invention, Mechagodzilla. You
are tasked with implementing a program to help retrieve Mechagodzilla after successful deployments.
Mechagodzillas movements are controlled by sending a series of inputs, N for north, E for east, S
for south, or W for west. If something goes wrong and Mechagodzilla is destroyed, we need to be able
to find it for retrieval.
The question we want to answer: Using a standard Cartesian grid, what are the xy coordinates of
Mechagodzilla after it finishes a series of movement inputs? Assume Mechagodzilla always starts at the
base coordinates of
Here are some examples to help clarify:
NNE: coordinate
NNEEENNW: coordinate
WNENWNSNN: coordinate
EESSENNESE: coordinate
WEENEWE: coordinate
NWEWWNSWW: coordinate
Page
Department of Computer Science
Thorvaldson Building
Science Place, Saskatoon, SK SN C Canada
Telephone: Facsimile:
CMPT
Winter
Principles of Computer Science
You will be given a number of datafiles containing inputs of different lengths. Each file will contain a number
of lines. Each line will represent inputs from a deployment. The program you must write will open the file,
read each line, and then print the final xy coordinates for that deployment to the console.
For example, if a datafile contained the examples above, your program would display
Detailed Example
Example File with only one deployment:
NNEEENNW
Program Output:
Illustration to help visualize path taken:
Page
Department of Computer Science
Thorvaldson Building
Science Place, Saskatoon, SK SN C Canada
Telephone: Facsimile:
CMPT
Winter
Principles of Computer Science
Task
For this question you will do the following:
You will start by creating a plan for your work. Your plan will schedule time for the following develop
ment phases:
Requirements. The specification is given above, so this part of the plan includes reading the Spec
ification section carefully. You do not need to hand in anything for this part.
Design. Your plan will indicate when you will do the design phase day time, location and how
long you think it will take duration
Implementation. Indicate when you will work on the implementation phase day time, location
using your design, and how long you think it will take duration
Testing and debugging. Indicate when you will work on testing and debugging day time, loca
tion and how long you think it will take duration
Final clean up for submission. Indicate when you will work on cleanup day time, location and
how long you think it will take duration
You must submit this plan for grading.
You will design your program, producing a design document outlining your implementation. You will
submit this design for grading.
You will record the amount of time you actually spent on each phase of the plan. You will submit this
information for grading.
Details
Details about the Plan: On page is an example table that you could use to outline your plan. It has
columns for the information required above. You are not required to follow your plan exactly, to the last
detail. Its a plan, not a commitment. Its helpful for monitoring your progress. You might find your plan
didnt account for issues and problems that came up Thats okay. Make note of those in your reflections.
Details About the Design: Your design document should describe your implementation in terms of the
functions youll need to complete the program. For each function, you must specify:
Pseudocode or informal algorithm descriptions. The form of the description is up to you.
An informal description of the inputs and outputs for each function.
An informal description of any test cases you will need to check your functions.
Its important for you to keep in mind that the purpose of the design is to help you, and you should not be
overly worried about the format of your design.
Details About the Implementation, Testing, and Debugging: Try to apply an incremental approach. For
each function in your design:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started