Presentation
Download
Report
Transcript Presentation
Java Programming
Chapter 1
Mrs. Ulshafer
August, 2013
What is a Computer?
An Electronic machine
Accepts information
Data
Processes information based
on instructions
Provides results or new
information
What is a Computer?
Program
List of instructions written in a
special language
Lets computers solve problems
Specific order to be performed
Tells computer what to do
Journal 1:
Prompt:
What do you expect to get
out of this course?
What are you most looking
forward to this semester?
Uses of
st
1
Computers
Navigation
Census Bureau
Military
Calculators Vs Computers
Computers make DECISIONS
The Modern Computer
Hardware: (Physical Components)
Base Unit
CPU
Storage Devices
CD-ROM, USB, ZIP
Hard Disk
Contained within base unit
The Modern Computer
Hardware: (Physical Components)
Keyboard, mouse and disk drives
Input of data
Monitor
• View input or output
Software
– Programs that tell computer
what to do
4 Subsystems of a Computer
Input Devices
tools that accept data
Memory
Electronic storage of
instructions and data
4 Subsystems of a Computer
Central Processing Unit (CPU)
Processes data
Controls flow of data
Output Devices
Tools where data can be
displayed
Monitors printers
Input
Directions of Data Flow
Memory
CPU
Output
Memory
Read-Only Memory (ROM)
Basic Operating Instructions
Permanent part
CAN NOT BE CHANGED
Random Access Memory (RAM)
Main memory
Stored temporarily
Lost after shut down
Memory
Auxiliary Memory Storage
long term storage
Reusable
Thumb Drives
CD – ROM
Hard Drive
Memory
Workings of Memory
access in Auxiliary
copy into RAM
copy into registers
Actions taken
copied back into RAM
copied back in auxiliary
CPU
Directs all activities
Information flows through
“BRAIN”
only follows instructions
Can NOT think
Add or compare numbers only
Changes operations into addition
Solves problems in nanoseconds
Number Systems
Base 2
Binary
Uses only 2 digits
0 for off, 1 for on
states of electrical circuits
powers of 2
Explain what the following
means:
“There are only 10 types of
people in the world: Those
who understand binary and
those that don’t”
Storing
Data
Binary system stores data
Each 0 or 1 is a bit
(BI-nary digi-T)
Bytes: 8 Bit Unit
RAM Measured in bytes
20 = 1, 000, 000
2
MB230 = 1, 000, 000, 000
GB40 = 1,000, 000, 000, 000
TB– 2
Storing Data
ASCII Code
American Standard Code for
Information Interchange
Letters, numbers and characters
are turned into numbers which
are turned into binary code
Always 1 byte long (8 bits)
Operating Systems
Windows 7- GUI
Special program
Graphical user interface (GUI)
Pictures (icons) to create a
user- friendly environment
Provides applications and tools
Object base operating system
Each item that appears is an
object
Programming Languages
Machine Language
Lowest Level
Directly typing in 0s and 1s
Depends on CPU type
High – Level Languages
FORTRAN, COBOL, PASCAL, C,
C++
Chunks of normal language
Compiler translates into machine
Java
Started for applets- downloadable
programs
Object-Oriented Language
Data described by objects
Then told what to do
organized
Must have a class
• Must have methods
–instructions
Java
Editor
– place to enter/modify Java text
Source Code
Java written text
Compiler
- Translates into Java bytecode
- Enforces rules of language
- Checks for errors in syntax and
some logic
• Java
Debug• Process of removing errors from
the program
Virtual Machine
Reads and runs bytecode
Portable
- can run programs on any
platform (mac, linux, windows)
Safe