As the user presses one of the following keys, background is cleared and co
esponding lines are drawn.
h : horizontal lines
v : vertical lines
g : grid lines
- : dotted horizontal lines (hyphen key) (moderate challenge)
i : dotted vertical lines (moderate challenge)
: forward slanted lines
\ : backward slanted lines (moderate challenge)
c : cursive lettering guide lines (moderate challenge)
e : end
If user presses any other key, you can make the system beep - look into slides that dealt with nested loops & keyboard
1. Write separate functions to draw each style of line and name it accordingly. Example : function names can be horizontal_lines(), vertical_lines(). Each of those functions will typically make use of one or two for-loop to get the job done; in some cases, nested for loop might be needed.
2. Call those functions at the appropriate places inside keyPressed().
3. Check processing reference setTitle() for displaying info on the title of the canvas - if you are unsure, you can display it on the console using println (use this option as the worst case scenario).
**all homework done in processing.org software
Lavf XXXXXXXXXX