Homework 2: The turtle takes its first steps
Using the GUI you have already developed, write a program
that allows the user to control the turtle. The
program should have the following capabilities:
- Move the turtle forward
- Rotate the turtle left or right
- The turtle's speed
should reflect the setting of the speed controller. Instantaneous travel
should also be an option.
- Pen control:
- When the pen is "down", the turtle leaves a trail as it moves
- When the pen is "up", the turtle does not leave a trail
- Clear screen (moving turtle to the center of the drawing area)
In addition to turtle control using graphical elements, a simple command
language should also be introduced that supports all of the above capabilities.
Other issues:
- The turtle should be displayed. It will suffice to draw
an isoceles triangle that points in the direction of the turtle's movement.
- There should be a feature that lets the user hide the turtle.
The turtle should be able to disappear and reappear arbitrarily.
- Any extra features you specified for your GUI may receive extra credit
at the instructor's discretion. Please speak to him if you are
interested in pursuing an extra credit option.
Deadlines
- Wednesday, September 2: Bring some samples of your code
to class on a USB drive. We will analyze code in terms of
Basic Design Principles.
- Friday, September 4: Be prepared to discuss
your design in class. Particular issues to focus on include:
- What are the major classes?
- What relationships do objects of these classes have with each other,
in the context of the application?
- Wednesday, September 9: Class will meet in the lab.
You will demonstrate your (partially) functioning program to the instructor
and to other students in the class.
- Monday, September 14: Submit program by 8:10 am. Programs will be reviewed by peers during class.
- Wednesday, September 16:
Write a
review of your program. Bring a hard copy to class.
Submit a copy on-line.
- Code review criteria for this assignment.