CS 101 Notes: 9/9/2010 Basics to Programming: 1. Get some input 2. Do some operations on that input 3. Provide/Display some results For step 2., we need to create/determine some Algorithm. Algorithm - a sequence of steps needed to solve a problem Algorithms are normally first expressed in our native spoken language. We need the Algorithm to be expressed in Java. Stepwise Refinement: is a process that takes parts of an Algorithm and re-expresses those parts into more detailed steps. Example: write a program to solve: x = 3y^2 - 5y + 10 Basic Turtle operations - forward (distance) - the turtle moves foward by "distance" pixels - turn (degrees) - the turtle will turn clockwise by the number of "degrees" - penUp () - the turtle is to lift up pen (stop drawing lines) - penDown () - the turtle is to set down the pen (start drawing lines) - setPenWidth (width) - set the thickness of the line drawn by the pen. - setPenColor (Color) - change the color of line being drawn