This program has almost no new concepts, so it should be pretty easy.
Let's write a bouncing ball simulator. We will only bounce the ball in one dimension, but if we illutrate it in a particular way, then we can watch the ball bounce against the left hand side of the screen. Some sample output is:
...........................................................................O ...........................................................................O ..........................................................................O ..........................................................................O ..........................................................................O ..........................................................................O .........................................................................O ........................................................................O ........................................................................O .......................................................................O ......................................................................O .....................................................................O ....................................................................O ...................................................................O ..................................................................O ................................................................O ...............................................................O .............................................................O ............................................................O ..........................................................O ........................................................O ......................................................O ....................................................O ..................................................O ...............................................O .............................................O ...........................................O ........................................O .....................................O ...................................O ................................O .............................O ..........................O .......................O ....................O ................O .............O .........O ......O ..O .O ....O ......O ........O ...........O .............O ...............O .................O ...................O .....................O ......................O ........................O .........................O ...........................O ............................O .............................O ..............................O ...............................O ................................O .................................O ..................................O ..................................O ...................................O ...................................O ....................................O ....................................O ....................................O ....................................O ....................................O ....................................O ....................................O ...................................O ...................................O ..................................O ..................................O .................................O ................................O ...............................O ..............................O .............................O ............................O ..........................O .........................O .......................O ......................O ....................O ..................O ................O ..............O ............O ..........O .......O .....O ..O O ..O ....O .....O .......O ........O ..........O ...........O ............O ..............O ...............O ...............O ................O .................O ..................O ..................O ...................O ...................O ...................O ...................O ...................O ...................O ...................O ...................O ..................O ..................O .................O .................O ................O ...............O ..............O .............O ............O ...........O ..........O ........O .......O .....O ...O .O O ..O ...O ....O .....O ......O .......O ........O .........O .........O ..........O ..........O ...........O ...........O ...........O ...........O ...........O ...........O ...........O ..........O ..........O .........O .........O ........O .......O ......O .....O ....O ...O .O O .O ..O ..O ...O ....O .....O .....O .....O ......O ......O ......O ......O ......O ......O .....O .....O ....O ....O ...O ..O .O O O O .O .O ..O ..O ..O ..O ..O ..O ..O ..O .O .O O O O O .O .O .O .O O O O O O O O O O O O O O O O O O O O O O
Good luck!
Ask me if there are any questions, and remember that elegance counts! peter@cs.uoregon.edu, or simply commenting below will all reach me immediately. Also recommended is coming in to office hours if you have any questions.
Turn your project in using the following form:
Questions? Answers!