proj3

proj3 - 4/22/2011 Project 3 Hints Two phases Complete all...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
4/22/2011 1 Project 3 Hints Two phases Complete all plot* functions. Then set up a loop like the following: while (true) { Get a str . If str is empty, break; while (there are more chars to process in str ) { Get a command . Interpret the command . If there is an error with the command , complain and break; Call the right plot* function for the command . } } Project 3 Hints For most of the plot* functions, you need a loop to visit each slot at a time. Use an offset . for (int i = 0; i < width; i++) { // Is (r, c+i) in the grid? // Do something about the character at (r, c+i). } r,c r, c+1 r, c+2 r, c+3 r, c+w 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4/22/2011 2 Project 3 Hints For *Rectangle functions: Use two offsets . for (int i = 0; i < height; i++) // For each row r+i, { for (int j = 0; j < width; j++) // visit columns in that row. { // Is (r+i, c+j) in the grid? // Do something about the character at (r+i, c+j). }
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

proj3 - 4/22/2011 Project 3 Hints Two phases Complete all...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online