Introduction to Computer Science What is Computer Science? Getting Started Programming
Computer Science Study of Recipes –Programs –Algorithms What do computer scientists study? –How do recipes work apart from how they are implemented—an algorithm –Can recipes be written for any problem? –How do people interact with a computer? –How do we store large amounts of data? –What kind of recipes can you write to ___________? You fill in the blank!
Programs What is a programming language? –Machine Language –Assembly Language –High Level Language Examples –Java –Scheme
Java public class HelloWorld { public static void main(String[] args) { System.out.println(“Hello World”); }
Scheme (define helloworld (lambda () (display “Hello world”) (newline)))
Program vs Algorithm What is the difference between a program and an algorithm? Your Turn!
Why Binary? Computers are just big collection of switches!!! = 87 Your turn –1001 –
Digital Media Images Sound Why digitize?
Java Object-oriented –Object –Class Syntax Semantics Analogous to a written language!!
DrJava Files Pane Definition Pane Interaction Pane
DrJava Demo Operators –Math –Relational Printing Integers vs Reals Strings Variables Object Variables