Show Bid Request
Turtle Graphics
Bid Request Id: 10488
|
|
|
Description:
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 moveswhile the pen is up,the turtle moves about freely without writing anything.You will simulate the operation of the turtle and creat a computerized sketchpad as well.Use a 20-by-20 array floor(initialized to '0').Read commands from an array that contains them.Keeps track of the current position of the turtle at all time and whether the pen is currently up/down.Assume the turtle always start at (0,0) of the floor with pen-up. Commands: 1=pen up 2=pen down 3=turn right 4=turn left 5,10=move forward 10 spaces(or a number other than 10) 6=print the 20-by-20 araay 9=End of data
as the turtle moves with pen down,set the appropriate elements of array floor to 1's.When print command is called,wherever there is a 1 in the array, print an asterisk.V,and 0 display blank.
Deliverables: This program assignment is roughly based on program exercise 4.23, Turtle Graphics.Read this assignment to know how it works. 1.Create a double subscripted floorArray class with a default size of 20 by 20.
2.Allow user to create a floorArray of any size.Example statement:floorArray myArray(15,15)
3.You will need a startingPositions that sets the starting position for placing the pound sign # in the floorArray.(I&'ve chosen the pound sign because the asterisk is used for pointers.)The startingPosition should default at (0,0).
4.You will need a variable spaces that is the number of spaces that should be moved.
5.Functions you will need include:
Functions to place the # sign in the floorArray including:
moveRight, moveLeft, moveUp, moveDown, moveDiagRt(allows for diagonal top left to bottom right movement \), moveDiagLt (allows for diagonal top right to bottom left movement /)
Overloaded << function for printingfloorArray.cout << myArray;
Overloaded =, ==, !=, +=functions to compare, assign and concatenate object of typefloorArray.
6.Create a driver that does the following:
In separate functions, create these objects but make them accessible to main:
a.Create square1 that is 10 by 10, starts in position (0,0)
b.Print the square using:cout << square1;
c.Create square2 using :square2 = square1;move square2 to position (10,10)
d.Print the square using:cout << square2;
e.Create rect1 that is 5 by 8, starts in position (10,10)
f.Print the square using:cout << rect1;
g.Create triangle1 that is 5 by 5 by 5, starts in position (10,10)
h.Print the square using:cout << triangle1;
In main:
i.Allow user to create a shape by selecting size of the floor, starting position, number spaces and the various move options.
j.Compare shape to your objects:
if (square1 == shape)
cout << “Your shape is the same as my square” << endl;
if (rect1 != shape)
cout << “Your shape is not my rectangle” << endl;
k.Create a new shape that concatenates square1 and square2
cout << square1 += square2
Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
Complete copyrights to all work purchased.
Platform:
Microsoft Visual C++
Special Conditions / Other:
Due on March 11 2002. Please make documentation for the codes.
Additional Files:
This bid request includes IMPORTANT additional attached files. Please download and read fully before bidding.
Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements.
We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation.
If you notice a violation please help out the site and report it. Thanks for your help.
|
|
Bidding/Comments:
|
All monetary amounts on the site are in United States dollars.
Rent a Coder is a closed auction, so coders can only see their own bids and comments. Buyers can view every posting made on their bid requests. |
See all rejected bids (and all comments)
Name |
Bid Amount |
Date |
Coder Rating |
|
|
|
This bid was accepted by the buyer!
|
$14 (USD)
|
Mar 9, 2002 6:52:59 PM EDT
|
9.41
(Superb)
|
|
|
it's an interesting exercise I'll do it in less than 3 hours. |
|
|
|
|
|