Download - Introduction to Computers & Java
![Page 1: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/1.jpg)
Introduction to Computers & Java
CSS 161: Fundamentals of Computing
Joe McCarthy
1
![Page 2: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/2.jpg)
Outline
• Introduction to Computers• Introduction to Computer Programming• Introduction to Java
CSS 161: Fundamentals of Computing 2
![Page 3: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/3.jpg)
Computers
CSS 161: Fundamentals of Computing 3
![Page 4: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/4.jpg)
Computer Hardware
CSS 161: Fundamentals of Computing 4
![Page 5: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/5.jpg)
Computer Hardware
CSS 161: Fundamentals of Computing 5
![Page 6: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/6.jpg)
Computer Software
CSS 161: Fundamentals of Computing 6
![Page 7: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/7.jpg)
Computer Software
CSS 161: Fundamentals of Computing 7
![Page 8: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/8.jpg)
CSS 161: Fundamentals of Computing
Note: program must be loaded into memory in order to execute
8
![Page 9: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/9.jpg)
Computer Memory
CSS 161: Fundamentals of Computing 9
![Page 10: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/10.jpg)
Computer Memory
CSS 161: Fundamentals of Computing
Alternate perspectives:
Key attributes: addressable / labeled locations that can store things
10
![Page 11: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/11.jpg)
Computer Disk(s)
CSS 161: Fundamentals of Computing 11
![Page 12: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/12.jpg)
Computer Disk(s)
CSS 161: Fundamentals of Computing
Alternate perspectives:
12
![Page 13: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/13.jpg)
Hierarchy of Memory
CSS 161: Fundamentals of Computing
Variables?
[CSS 422 and CSS 430 go into much further depth]
13
![Page 14: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/14.jpg)
Hierarchy of Memory
CSS 161: Fundamentals of Computing
Variables:• Speed• Cost• Size• Volatility
[CSS 422 and CSS 430 go into much further depth]
14
![Page 15: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/15.jpg)
CSS 161: Fundamentals of Computing 15
![Page 16: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/16.jpg)
Fundamentals of Computing
CSS 161: Fundamentals of Computing 16
![Page 17: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/17.jpg)
Fundamentals of Computer Programming
CSS 161: Fundamentals of Computing 17
![Page 18: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/18.jpg)
Fundamentals of Computer Programming
• What is a program?
CSS 161: Fundamentals of Computing 18
![Page 19: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/19.jpg)
Fundamentals of Computer Programming
• What is a program?• What is programming?
CSS 161: Fundamentals of Computing 19
![Page 20: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/20.jpg)
Fundamentals of Computer Programming
• What is a program?• What is programming?• What is a computer program?
CSS 161: Fundamentals of Computing 20
![Page 21: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/21.jpg)
Fundamentals of Computer Programming
• What is a program?• What is programming?• What is a computer program?• What is computer programming?
CSS 161: Fundamentals of Computing 21
![Page 22: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/22.jpg)
CSS 161: Fundamentals of Computing 22
![Page 23: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/23.jpg)
CSS 161: Fundamentals of Computing
FirstProgram.java
FirstProgram.class
javac
java
23
![Page 24: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/24.jpg)
CSS 161: Fundamentals of Computing 24
![Page 25: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/25.jpg)
[In Mac OS X Terminal window]
CSS 161: Fundamentals of Computing 25
d-173-250-140-5:Code joe$ ls FirstProgram*FirstProgram.javad-173-250-140-5:Code joe$ javac FirstProgram.javad-173-250-140-5:Code joe$ ls FirstProgram*FirstProgram.class FirstProgram.javad-173-250-140-5:Code joe$ java FirstProgramHello reader.Welcome to Java.Let's demonstrate a simple calculation.2 plus 2 is 4d-173-250-140-5:Code joe$
![Page 26: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/26.jpg)
[In Mac OS X Terminal window]
CSS 161: Fundamentals of Computing 26
d-173-250-140-5:Code joe$ ls FirstProgram*FirstProgram.javad-173-250-140-5:Code joe$ javac FirstProgram.javad-173-250-140-5:Code joe$ ls FirstProgram*FirstProgram.class FirstProgram.javad-173-250-140-5:Code joe$ java FirstProgramHello reader.Welcome to Java.Let's demonstrate a simple calculation.2 plus 2 is 4d-173-250-140-5:Code joe$
Program [only] computes 2 + 2 = 4.How can we make this more general?
![Page 27: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/27.jpg)
CSS 161: Fundamentals of Computing 27
![Page 28: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/28.jpg)
Java Programs
CSS 161: Fundamentals of Computing 28
![Page 29: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/29.jpg)
CSS 161: Fundamentals of Computing 29
![Page 30: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/30.jpg)
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 30
![Page 31: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/31.jpg)
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 (developing) Java code, so we want JDK– Which includes JRE
CSS 161: Fundamentals of Computing 31
![Page 32: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/32.jpg)
CSS 161: Fundamentals of Computing 32
![Page 33: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/33.jpg)
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
CSS 161: Fundamentals of Computing
netbeans.orgeclipse.orgbluej.org
33
![Page 34: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/34.jpg)
Downloading BlueJ [optional]
CSS 161: Fundamentals of Computing
http://www.bluej.org/download/download.html
34
![Page 35: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/35.jpg)
UWB CSS Labs
CSS 161: Fundamentals of Computing 35
http://www.uwb.edu/css/facilities
![Page 36: Introduction to Computers & Java](https://reader035.vdocument.in/reader035/viewer/2022062321/56812d1a550346895d920f95/html5/thumbnails/36.jpg)
Next time (Wednesday)
• Get textbook• Read: – Absolute Java, Section 1.1-1.2– Java: An Introduction…, Sections 1.1-1.3• Recommended: Section 1.4
CSS 161: Fundamentals of Computing 36