css161 fundamentals#of#compu3ng# …courses.washington.edu/css161/umurthy/learning... ·...
TRANSCRIPT
CSS 161 Fundamentals of Compu3ng
Introduc3on to Computers & Java September 26, 2012
CSS 161: Fundamentals of Compu3ng
Instructor: Uma Murthy
CSS SKL 161 A Instructor: Joe McCarthy
Outline
• Update / reminder • Introduc3on to Computers
• Introduc3on to Java
CSS 161: Fundamentals of Compu3ng
Updates
• Assigned readings – Any material in assigned readings is poten3al 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 aMer each class
• Please complete survey by Friday, Sep 28
CSS 161: Fundamentals of Compu3ng
Required Textbook
Absolute Java, 5th Edi3on Walter Savitch & Kenrick Mock Addison-‐Wesley, 2013
CSS 161: Fundamentals of Compu3ng
4th Edi3on OK, too
Supplemental Material (1/2)
CSS 161: Fundamentals of Compu3ng
Java: An Introduc3on to Problem Solving & Programming, 6th Edi3on Walter Savitch Addison-‐Wesley, 2012
hZp://courses.washington.edu/css161/joemcc/Notes/
SavitchCh01.pdf
(access via “Notes” link on course homepage)
Supplemental material (2/2)
• Prac3ce It! hZp://webster.cs.washington.edu:8080/prac3ceit/
• Instruc3ons to be provided in the coming weeks
CSS 161: Fundamentals of Compu3ng
Experimenta3on via programming
“Do not be too 3mid and squeamish about your ac3ons. All life is an experiment. The more experiments you make the beZer.”
-‐ Ralph Waldo Emerson
CSS 161: Fundamentals of Compu3ng
Corollary: All programs are experiments. The more programs you make the beZer.
Other introductory CS courses
CSS 161: Fundamentals of Compu3ng
Java
• Goal: – Write once, run anywhere – JDK: Java Developers Kit – JRE: Java Run3me Environment
• Edi3ons – SE: Standard Edi3on – EE: Enterprise Edi3on – ME: Micro Edi3on (mobile, embedded) – Embedded: flash memory, closed systems
• Versions – 1.0 (1992), .. 1.6 (2006), 1.7 (2011)
CSS 161: Fundamentals of Compu3ng
Downloading Java [op3onal]
• hZp://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) • hZp://www.java.com/en/download/manual_v6.jsp • Supported thru February 2013
• We will be wri3ng Java, so we want JDK – Which includes JRE
CSS 161: Fundamentals of Compu3ng
CSS 161: Fundamentals of Compu3ng
Integrated Development Environments (IDEs)
• Programming tools – Edit text (code) + compile + run
– Graphical representa3ons of components
• We’ll be using BlueJ, but you can use others
CSS 161: Fundamentals of Compu3ng
netbeans.org eclipse.org bluej.org
Downloading BlueJ [op3onal]
CSS 161: Fundamentals of Compu3ng
hZp://www.bluej.org/download/download.html
Computers
CSS 161: Fundamentals of Compu3ng
Computer Hardware
CSS 161: Fundamentals of Compu3ng
Computer Hardware
CSS 161: Fundamentals of Compu3ng
Computer SoMware
CSS 161: Fundamentals of Compu3ng
Computer SoMware
CSS 161: Fundamentals of Compu3ng
CSS 161: Fundamentals of Compu3ng
Note: program must be loaded into memory in order to execute
Computer Memory
CSS 161: Fundamentals of Compu3ng
Computer Memory
CSS 161: Fundamentals of Compu3ng
Alternate perspec3ves:
Key aZributes: addressable / labeled loca3ons that can store things
Computer Disk(s)
CSS 161: Fundamentals of Compu3ng
Computer Disk(s)
CSS 161: Fundamentals of Compu3ng
Alternate perspec3ves:
Hierarchy of Memory
CSS 161: Fundamentals of Compu3ng
Variables?
[CSS 422 and CSS 430 go into much further depth]
Hierarchy of Memory
CSS 161: Fundamentals of Compu3ng
Variables: • Speed • Cost • Size • Vola3lity
[CSS 422 and CSS 430 go into much further depth]
CSS 161: Fundamentals of Compu3ng
CSS 161: Fundamentals of Compu3ng
CSS 161: Fundamentals of Compu3ng
[In Mac OS X Terminal window]
CSS 161: Fundamentals of Compu3ng
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 Compu3ng
Next 3me
• LAB 1 on Friday • Homework 1 handed out on Monday
• Console input and output
CSS 161: Fundamentals of Compu3ng