UWB CSS 161 Fundamentals of Computing

Download Report

Transcript UWB CSS 161 Fundamentals of Computing

CSS 161
Fundamentals of Computing
Introduction to Computers & Java
September 26, 2012
Instructor: Uma Murthy
CSS SKL 161 A Instructor: Joe McCarthy
CSS 161: Fundamentals of Computing
Outline
• Update / reminder
• Introduction to Computers
• Introduction to Java
CSS 161: Fundamentals of Computing
Updates
• Assigned readings
– Any material in assigned readings
is potential fodder for exams,
regardless of whether we cover it
in a lecture, lab or assignment
• Slides will always be posted on web site
– Typically, shortly after each class
• Please complete survey by Friday, Sep 28
CSS 161: Fundamentals of Computing
Required Textbook
Absolute Java, 5th Edition
Walter Savitch &
Kenrick Mock
Addison-Wesley, 2013
4th Edition OK, too
CSS 161: Fundamentals of Computing
Supplemental Material (1/2)
Java: An Introduction to
Problem Solving &
Programming, 6th Edition
Walter Savitch
Addison-Wesley, 2012
http://courses.washington.edu/css161/joemcc/Notes/SavitchC
h01.pdf
(access via “Notes” link on course homepage)
CSS 161: Fundamentals of Computing
Supplemental material (2/2)
• Practice It!
http://webster.cs.washington.edu:8080/practiceit/
• Instructions to be provided in the coming
weeks
CSS 161: Fundamentals of Computing
Experimentation via programming
“Do not be too timid and squeamish
about your actions.
All life is an experiment.
The more experiments you make
the better.”
- Ralph Waldo Emerson
Corollary:
All programs are experiments.
The more programs you make
the better.
CSS 161: Fundamentals of Computing
Other introductory CS courses
CSS 161: Fundamentals of Computing
Java
• Goal:
– Write once, run anywhere
– JDK: Java Developers Kit
– JRE: Java Runtime Environment
• Editions
–
–
–
–
SE: Standard Edition
EE: Enterprise Edition
ME: Micro Edition (mobile, embedded)
Embedded: flash memory, closed systems
• Versions
– 1.0 (1992), .. 1.6 (2006), 1.7 (2011)
CSS 161: Fundamentals of Computing
Downloading Java [optional]
• http://www.java.com/getjava/
– Current: Version 7 update 7 (1.7u7)
• On Mac, requires Mac OS X 10.7.3 or higher
– Can also use Version 6 update 35 (1.6u35)
• http://www.java.com/en/download/manual_v6.jsp
• Supported thru February 2013
• We will be writing Java, so we want JDK
– Which includes JRE
CSS 161: Fundamentals of Computing
CSS 161: Fundamentals of Computing
Integrated Development Environments
(IDEs)
• Programming tools
– Edit text (code) + compile + run
– Graphical representations of components
• We’ll be using BlueJ, but you can use others
bluej.org
eclipse.org
CSS 161: Fundamentals of Computing
netbeans.org
Downloading BlueJ [optional]
http://www.bluej.org/download/download.html
CSS 161: Fundamentals of Computing
Computers
CSS 161: Fundamentals of Computing
Computer Hardware
CSS 161: Fundamentals of Computing
Computer Hardware
CSS 161: Fundamentals of Computing
Computer Software
CSS 161: Fundamentals of Computing
Computer Software
CSS 161: Fundamentals of Computing
Note: program must be loaded into memory in order to execute
CSS 161: Fundamentals of Computing
Computer Memory
CSS 161: Fundamentals of Computing
Computer Memory
Alternate perspectives:
Key attributes: addressable / labeled locations that can store things
CSS 161: Fundamentals of Computing
Computer Disk(s)
CSS 161: Fundamentals of Computing
Computer Disk(s)
Alternate perspectives:
CSS 161: Fundamentals of Computing
Hierarchy of Memory
Variables?
[CSS 422 and CSS 430 go into much further depth]
CSS 161: Fundamentals of Computing
Hierarchy of Memory
Variables:
• Speed
• Cost
• Size
• Volatility
[CSS 422 and CSS 430 go into much further depth]
CSS 161: Fundamentals of Computing
CSS 161: Fundamentals of Computing
CSS 161: Fundamentals of Computing
CSS 161: Fundamentals of Computing
[In Mac OS X Terminal window]
localhost:code umurthy$ ls FirstProgram*
FirstProgram.java
localhost:code umurthy$ javac FirstProgram.java
Localhost:code umurthy$ ls FirstProgram*
FirstProgram.class
FirstProgram.java
Localhost:code umurthy$ java FirstProgram
Hello reader.
Welcome to Java.
Let's demonstrate a simple calculation.
2 plus 2 is 4
Localhost:code umurthy$
CSS 161: Fundamentals of Computing
CSS 161: Fundamentals of Computing
Next time
• LAB 1 on Friday
• Homework 1 handed out on Monday
• Console input and output
CSS 161: Fundamentals of Computing