Which is particularly popular among personal computer users


(Turtle graphics) The Logo language, which is particularly popular among personal computer users, made the concept of turtle
graphics famous. Imagine a mechanical turtle that walks around the room under the control of a C program. The turtle holds a
pen in one of the two positions, up or down. While the pen is down, the turtle traces out shapes as it moves; while the pen is up,
the turtle moves about freely without writing anything. In this problem you will simulate the operation of the turtle and create a
computerized sketchpad as well.
Use a 50-by-50 array floor which is initialized to zeros. Read commands from an array that contains them. Keep track of the
current position of the turtle at all times and whether the pen is currently up or down. Assume that the turtle always starts at
position 0,0 of the floor with its pen up. The set of turtle commands your program must process are as follows:
Command Meaning
1234
5,10
69
Pen up
Pen down
Turn right
Turn left
Move forward 10 spaces (or a number other than 10)
Print the 20-by-20 array
End of data (sentinel)
Suppose that the turtle is somewhere near the center of the floor. The following "program" would draw and print a 12-by-12 square:
2
5,12
3
5,12
3
5,12
3
5,12
169
As the turtle moves with the pen down, set the appropriate elements of array floor to 1s. When the 6 command (print) is given, where're
there is a 1 in the array, display an asterisk, or some other character you choose. Wherever there is a zero, display a blank. Write a
program to implement the turtle graphics capabilities discussed here. Write several turtle graphics programs to draw interesting shapes.
Add other commands to increase the power of your turtle graphics language. 

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Which is particularly popular among personal computer users
Reference No:- TGS0109968

Expected delivery within 24 Hours