Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Im getting frustrated because there must be an individual turtle class ( turtle.h , turtle.cpp ) , pen class (pen.h, pen.cpp) , direction class, and

Im getting frustrated because there must be an individual turtle class ( turtle.h , turtle.cpp ) , pen class (pen.h, pen.cpp) , direction class, and so forth as indicated in the last picture. Hopefully you can help this is really crushing my spirits. Thank you.

image text in transcribedimage text in transcribed

I was hoping you could help with the loop condition as well.. I'm not very confident in mine but i'll post it here. I thought I was doing it correctly at first but now i'm doubting myself. Thank you. image text in transcribed

The Logo language, made the concept of turtle graphics famous. It was a mechanical turtle that walked around and drew shapes. The turtle holds a pen in one of 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. This is similar to the way some line draw programs work. You are to design such a program CODE: Use a 20 by 20 array or floor which is initialized to zeros. Keep track of the current position of the turtle at all times, the direction it is heading, and whether the pen is currently up or down. Assume that the turtle always starts position 0,0 on the floor with its pen up, heading to the right or east. The set of turtle commands your program must process are: WN + change pen position turn move forward print change brush erase/start over jump see menu again end program 000 O command 1 is to act as a toggle command 2 is to rotate 90 degrees from current direction ( direction of rotation is user supplied) command 3 is to move forward x units ( x is user supplied ) command 4 will print/display the entire floor command 5 will present four different character/brush options command 7 will jump/move the turtle to a new position (x,y) on the floor, which are user supplied direction.h Solution Explorer 1x Position.cpp* + x Position.h Turtle Project #include #include "position.h" turtle.h - Position - display - using namespace std; //const int num = 20; int width = 20; int height = 20; Search Solution Explorer (Ctrl+;) Solution 'Turtle Project' (1 of 1 project) 1 Turtle Project -1 References D G External Dependencies 1 Header Files direction.h G Position.h G turtle.h Resource Files 1 4 Source Files ++ Position.cpp //constructor Position::Position() int SIZE [height][width]; ///data = new int[size]; //display the floor void Position::display() Solution Explorer Team Explorer for (int i = 0; i - In: 29 Ch: 13 TABS CRLF ... IX The Logo language, made the concept of turtle graphics famous. It was a mechanical turtle that walked around and drew shapes. The turtle holds a pen in one of 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. This is similar to the way some line draw programs work. You are to design such a program CODE: Use a 20 by 20 array or floor which is initialized to zeros. Keep track of the current position of the turtle at all times, the direction it is heading, and whether the pen is currently up or down. Assume that the turtle always starts position 0,0 on the floor with its pen up, heading to the right or east. The set of turtle commands your program must process are: WN + change pen position turn move forward print change brush erase/start over jump see menu again end program 000 O command 1 is to act as a toggle command 2 is to rotate 90 degrees from current direction ( direction of rotation is user supplied) command 3 is to move forward x units ( x is user supplied ) command 4 will print/display the entire floor command 5 will present four different character/brush options command 7 will jump/move the turtle to a new position (x,y) on the floor, which are user supplied direction.h Solution Explorer 1x Position.cpp* + x Position.h Turtle Project #include #include "position.h" turtle.h - Position - display - using namespace std; //const int num = 20; int width = 20; int height = 20; Search Solution Explorer (Ctrl+;) Solution 'Turtle Project' (1 of 1 project) 1 Turtle Project -1 References D G External Dependencies 1 Header Files direction.h G Position.h G turtle.h Resource Files 1 4 Source Files ++ Position.cpp //constructor Position::Position() int SIZE [height][width]; ///data = new int[size]; //display the floor void Position::display() Solution Explorer Team Explorer for (int i = 0; i - In: 29 Ch: 13 TABS CRLF ... IX

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions