Professional Documents
Culture Documents
Computer Science 1: CPS109 With Prof. Kosta Derpanis
Computer Science 1: CPS109 With Prof. Kosta Derpanis
Computer Science 1: CPS109 With Prof. Kosta Derpanis
COMPUTER SCIENCE 1
with Prof. Kosta Derpanis
Hello, World!
Part 1
, B i g Java : L ate O bj ec t s
H o rs t m a nn
LECTURE TOPICS
LECTURE TOPICS
Computers and programming
LECTURE TOPICS
Computers and programming
Introduction to Java
Computer components
computer
system
input
input
input
output
input
output
C input
P ALU control unit
U
registers
output
C input
P ALU control unit
U
registers
output
C input
P ALU control unit
U
registers
output
main memory
C input
P ALU control unit
U
registers
output
main memory
C input
P ALU control unit
U
registers
output
main memory
C input
P ALU control unit
U
registers
output
main memory
secondary storage
C input
P ALU control unit
U
registers
output
main memory
secondary storage
network
ENIAC
First electronic general-purpose computer
e r farm (c i rc a 19 95)
Pixar rend
C input
P ALU control unit
U
registers
output
main memory
secondary storage
network
Solving
Problems
Define
Problem
Solving
Problems
Define Analyze
Problem Problem
Solving
Problems
Update
Update
Update
Directions:
1. Add dry ingredients.
2. Mix.
3. Add water.
4. Knead.
5. Let rise.
6. Bake.
Bread output
Ingredients:
3/4 cup warm water
1 package active dry yeast
1 tsp salt
1-1/2 tbsp sugar
1 tbsp vegetable shortening
1/2 cup milk
3 cups all-purpose flour
Directions:
1. Add dry ingredients.
2. Mix.
3. Add water.
4. Knead.
5. Let rise.
6. Bake.
Bread output
Ingredients:
3/4 cup warm water
1 package active dry yeast
1 tsp salt
1-1/2 tbsp sugar input
1 tbsp vegetable shortening
1/2 cup milk
3 cups all-purpose flour
Directions:
1. Add dry ingredients.
2. Mix.
3. Add water.
4. Knead.
5. Let rise.
6. Bake.
Sort the following numbers in ascending order:
6 1 13 7 11 9 2 8
Sort the following numbers in ascending order:
6 1 13 7 11 9 2 8
H ow wo u l d you so r t th is l i s t?
Ins
e rtio
ns
ort
program
a series of instructions that a computer
can interpret and execute
Program
ming
Language
s
1110 0010
0110 0000
0001 0000
Program
ming
Language
s
1110 0010
0110 0000
0001 0000
Te d i o u s to p ro gra m
Program
ming
Language
s
object 2
object 1 object 3
Java is an object-oriented programming (OOP)
language
object 2
object 1 object 3
inte rac t v i a
methods
Java is an object-oriented programming (OOP)
language
object 2
s a m e k i n d
e c t s o f th e s
obj p e o r c l a s
e sa m e t y
have t h
object 1 object 3
applet
vs.
application program
run from web browser
applet
vs.
application program
L 5
TM
H
L 5
TM
H
run from web browser
applet
vs.
application program
run from web browser
applet
vs.
application program
n g i nte r f a ce or con s o le
run from w i n d ow i
IDE
Integrated Development Environment
BlueJ