CS 111 - Program Design 1
Exam Review URL
Topics for First Exam
Java Basics
- Java identifies and variable names
- Java Types
- int
- float, double
- char
- boolean
- String
- Assignment Statements: =
- Arithmetic operators: + - * / % ()
- String concatonation: +
- Relational operators: > >= < <=
=
- while loops
- writing methods and method calls
Turtle Drawings
- Picture/World objects
- creating a world or picture
- show()
- Turtle Objects
- creating a turtle
- forward()
- turn()
- setPenColor()
- penUp()
- penDown()
- setPenWidth()
- Drawing Regular Polygons
- each angle is 360/numberOfSides
- Drawing Star shape
- each angle is 720/numberOfSides
- Saving and restoring the Color of a Turtle
- Color colorSaved = t.getPenColor()
- t.setPenColor ( secondColor )
- draw shape with seconColor
- t.setPenColor (colorSaved)
-- Main.troy - 2014-02-20
Topic revision: r2 - 2014-02-21 - 14:45:08 - Main.troy