Question: nclude DrawTool . h in your Code 4 . c file. In main ( ) Declare a 2 D array with a max size of

nclude DrawTool.h in your Code4.c file.
In main()
Declare a 2D array with a max size of 20 for both dimensions. Anything larger than 20 tends to wrap and be
messy on the screen. This max size is set as a #define in DrawTool.h. You should not hardcode 20
anywhere in your program use the #define from DrawTool.h.
Call function InitializeMap from DrawTool
Parameters
array
user-chosen size of the map (pass by reference).
Call function PrintInstructions() from DrawTool
No parameters
Call function to PrintMap() from DrawTool
Parameters
array
user-input size of the map
Prompt for a draw command and read it using fgets(). Then use strtok() to parse out just the draw
command (Q, P, V or H). If the user entered 'Q' or 'q' as the draw command, then your program should quit.
If the user did not enter Q, then use strtok() to parse out the rest of the components of the draw
command. If the mark value is not entered, then X should be used as a default value.
The draw command should be entered as described in the instructions. Each draw command is one prompt
not multiple prompts.
All draw commands should be validated to ensure they will not go out of bounds. Check for out of bounds for
both the coordinate and line. You cannot draw a line that will end of out of bounds.
For the point command ('P'), update that point in the array with the input mark.

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 Programming Questions!