Homework 2 (ASCII Art / Space Needle) FAQ
-
Q: What are some good resources I can look at to help me on this assignment?
-
A: The book chapter, lecture programs/slides, and section handout are always good places to look. In particular, you may want to look at the following examples:
- Chapter 2 case study, p. 98:
DrawFigure
- Lecture program
Mirror.java
- Section handout 2, Problem 2 for tables, Problems 4-5 for figure, Problems 6-7 for constant
-
Q: How do I figure out what my loop should go up to? I don't understand nested loops!
-
A: The outer loop is the "vertical" loop and is fairly simple; it generally counts the lines from 1 to however many lines there are in that section of the figure. The inner loop is the "horizontal" one and requires more skill to get right. Use an inner loop for every portion of the line that is repeated, and use the slope-intercept formula and loop tables (as shown in class) to figure out how many repetitions to use.
-
Q: How do I add in the constant?
-
A: Try making a loop table at two different figure sizes and compare expressions from size 3 to size 4 (for example), to help factor out the constant. See section handout 2, Q6-7.
-
Q: Do I need to eliminate partial-line redundancy?
-
A: Not unless it's a very large and very redundant part of a line.
-
Q: Is this okay for my Part A drawing? Will it get full credit?
-
A: As long as it meets the guidelines in the assignment writeup, it should be fine.