CS51 - Fall 2009 - Lecture 1
Introduction
Why this course?
What is computer science?
Algorithms
Giving an unambiguous set of instructions to a computer that is sufficiently precise to accomplish some set task.
Computers, unlike humans, follow instructions exactly and will do so time after time after time.
We will be solving problems and then implementing the solutions in Java.
Administrivia
<
pdf
>
Introduction to java
Programs are compiled and can then be run on any machine that has an appropriate java virtual machine installed
MakeBox
class, method, instructions
begin
method
onMousePress
method
Java basics
graphics primitives
FilledRect
FramedRect
FilledOval
FramedOval
Line
Text
constructors
screen coordinates
mouse event handling
onMousePress(Location p)
onMouseRelease(Location p)
onMouseClick(Location p)
onMouseMove(Location p)
onMouseDrag(Location p)
onMouseEnter(Location p)
onMouseExit(Location p)