Introduction to Java - PowerPoint PPT Presentation

1 / 55
About This Presentation
Title:

Introduction to Java

Description:

generic term for any other kind of software. word processors, missile control systems, games ... objects that interact within a program (JAVA, SmallTalk, C ) ... – PowerPoint PPT presentation

Number of Views:82
Avg rating:3.0/5.0
Slides: 56
Provided by: Mich897
Category:

less

Transcript and Presenter's Notes

Title: Introduction to Java


1
(No Transcript)
2
CSCI-104
  • Introduction
  • Components of a Computer
  • How those components interact
  • How computers store and manipulate information
  • Computer networks
  • The Internet and the World-Wide Web
  • Programming and programming languages

3
Definition of a Computer
  • A programmable electronic machine that performs
    high speed mathematical or logical operations or
    that assembles, stores, correlates or processes
    information. From The American Heritage
    Dictionary.

4
Hardware and Software---
  • Hardware
  • the physical, tangible parts of a computer
  • keyboard, monitor, wires, chips, data
  • Software
  • programs and data
  • a program is a series of instructions
  • A computer requires both hardware and software
  • Each is essentially useless without the other

5
CPU and Main Memory
Chip that executes program commands Intel
Pentium IV Sun Sparc Processor
Central Processing Unit
Primary storage area for programs and data that
are in active use Synonymous with RAM
6
Secondary Memory Devices
Information is moved between main memory and
secondary memory as needed
Secondary memory devices provide long-term storage
Central Processing Unit
Hard disks Floppy disks ZIP disks Writable
CDs Tapes
Main Memory
7
Input / Output Devices
I/O devices allow user interaction
Central Processing Unit
Monitor screen Keyboard Mouse Bar code
scanner Light pen Touch screen
Main Memory
8
A Computer Specification
  • Consider the following specification for a
    personal computer
  • 2.5 GHz Pentium IV Processor
  • 512 MB RAM
  • 80 GB Hard Disk
  • 24x speed CD ROM Drive
  • 21 Multimedia Video Display with 1280 x 1024
    resolution
  • Cable or 56K Modem
  • What does it all mean?

9
Memory
10
Storing Information
11
Storage Capacity
  • Every memory device has a storage capacity,
    indicating the number of bytes it can hold
  • Capacities are expressed in various units

Unit Symbol Number of Bytes
kilobyte megabyte gigabyte terabyte
KB 210 1024
MB 220 (over 1 million)
GB 230 (over 1 billion)
TB 240 (over 1 trillion)
12
Analog vs. Digital
  • There are two basic ways to store and manage
    data
  • Analog
  • continuous, in direct proportion to the data
    represented
  • music on a record album - a needle rides on
    ridges in the grooves that are directly
    proportional to the voltage sent to the speaker
  • Digital
  • the information is broken down into pieces, and
    each piece is represented separately
  • music on a compact disc - the disc stores numbers
    representing specific voltage levels sampled at
    various points

13
Digital Information
  • Computers store all information digitally
  • -numbers
  • -text
  • -graphics and images
  • -audio
  • -video
  • -program instructions
  • In some way, all information is digitized -
    broken down into pieces and represented as numbers

14
Representing Text Digitally
  • For example, every character is stored as a
    number, including spaces, digits, and punctuation
  • Corresponding upper and lower case letters are
    separate characters

H i , H e a t h e r .
15
Binary Numbers
  • Once information is digitized, it is represented
    and stored in memory using the binary number
    system
  • A single binary digit (0 or 1) is called a bit
  • Devices that store and move information are
    cheaper and more reliable if they only have to
    represent two states
  • A single bit can represent two possible states,
    like a light bulb that is either on (1) or off
    (0)
  • Combinations of bits are used to store values

16
Bit Combinations
Each additional bit doubles the number of
possible combinations
17
Bit Combinations
  • Each combination can represent a particular item
  • There are 2N combinations of N bits
  • Therefore, N bits are needed to represent 2N
    unique items

21 2 items
22 4 items
23 8 items
24 16 items
25 32 items
18
RAM vs. ROM
  • RAM - Random Access Memory (direct access)
  • ROM - Read-Only Memory
  • The terms RAM and main memory are basically
    interchangeable
  • ROM could be a set of memory chips, or a separate
    device, such as a CD ROM
  • Both RAM and ROM are random (direct) access
    devices!
  • RAM should probably be called Read-Write Memory

19
The Central Processing Unit
  • A CPU is also called a microprocessor
  • It continuously follows the fetch-decode-execute
    cycle

20
The Central Processing Unit (CPU)
  • The CPU contains

Performs calculations and decisions
Arithmetic / Logic Unit
Coordinates processing steps
Control Unit
Small storage areas
Registers
21
The Central Processing Unit
  • The speed of a CPU is controlled by the system
    clock
  • The system clock generates an electronic pulse at
    regular intervals
  • The pulses coordinate the activities of the CPU
  • The speed is measured in megahertz (MHz)

22
Monitor
  • The size of a monitor (21") is measured
    diagonally, like a television screen
  • Most monitors these days have multimedia
    capabilities text, graphics, video, etc.
  • A monitor has a certain maximum resolution ,
    indicating the number of picture elements, called
    pixels, that it can display (such as 1280 by
    1024)
  • High resolution (more pixels) produces sharper
    pictures

23
Modem
  • Data transfer devices allow information to be
    sent and received between computers
  • Many computers include a modem, which allows
    information to be moved across a telephone line
  • A data transfer device has a maximum data
    transfer rate
  • A modem, for instance, may have a data transfer
    rate of 56,000 bits per second (bps)

24
Type Classifications of Machines
  • Size/ Cost
  • Supercomputer
  • 10 million dollars
  • Extremely fast
  • Parallel processing
  • Multiple processors

25
Size / Cost (Cont)
  • Mainframe
  • Half million to 2 million dollars
  • Centralized processing
  • Fast
  • Usually 2-4 processors

26
Size / Cost
  • Minicomputer/Workstation
  • 100,000 down to 10,000
  • Supports multiple users
  • Fast
  • 1-2 processors
  • Dedicated to specific tasks
  • Good graphics ability

27
Size / Cost
  • Personal Computer
  • 1,000 down to 100
  • Single user in general
  • Speed processor dependent
  • Single processor
  • Embedded
  • Built into equipment
  • Dedicated to only a few functions

28
History of Computing
  • Electronic machines appeared around 1939-1945
  • Prior to that time
  • Mechanical devices prior to 1 AD (Greeks)
  • Calculators - 1600s
  • Programmable mechanical device- Babbage/Lovelace
    - 1850s

29
1939 - 1950
  • Electronic - tubes
  • Huge machines - occupied entire buildings
  • Wired in programs
  • Crude storage devices
  • Printed output

30
1951 - 1960
  • Early programmable machines
  • Idea of storing programs and data in memory
  • Start of higher level languages
  • Univac 1 - early commercial machines
  • Mainframe machines - expensive, rare
  • Use of transistors

31
1961 - 1970
  • second and third generation machines
  • high level languages defined
  • IBM takes the lead in machines
  • Software development methods begin to appear
  • More companies can afford the machines
  • IBM 370 series appears

32
1971 - 1980
  • Minicomputers appear early in the decade
  • New versions of higher level languages
  • Early microchips (late in decade)
  • IBM is major supplier
  • Computers common in medium sized companies

33
1981 - 1990
  • Personal computers appear later (Apple, IBM)
  • DOS
  • Early graphical user interfaces
  • Visicalc - first spreadsheet program
  • Computers common in small businesses
  • Networks start to appear

34
1991 - Now
  • Windows and other GUI OSs available
  • Microsoft cleans up in software
  • PCs common in the home
  • WWW
  • Object Oriented languages
  • Cheaper memory, faster CPUs

35
Problem Solving
  • The purpose of writing a program is to solve a
    problem
  • The general steps in problem solving are
  • Understand the problem
  • Dissect the problem into manageable pieces
  • Design a solution
  • Consider alternatives to the solution and refine
    it
  • Implement the solution
  • Test the solution and fix any problems that exist

36
Software Categories
  • Operating System
  • controls all machine activities
  • provides the user interface to the computer
  • manages resources such as the CPU and memory
  • Windows 98, Windows 2000, Unix, Linux, Mac OS

37
Application Programs
  • Application program
  • generic term for any other kind of software
  • word processors, missile control systems, games
  • Most operating systems and application programs
    have a graphical user interface (GUI)

38
Software Programs
  • Consists of programs and associated data.
  • Executes on specific operating systems.
  • Generally the consumer only sees the compiled
    results of a developers work, not the actual
    source code.
  • Costs Free - millions of dollars. (Custom
    software can be very expensive.).

39
Software Development
  • Considered a form of engineering.
  • No licensing requirements in most states odd
    since programs can run nuclear power plants,
    other life critical tasks.
  • Most of the cost of software is caused by labor
    costs.

40
Computer Languages
  • Source of all software
  • Provides a way to produce working software
    without the need to think at the level of CPU
    commands
  • Programmer friendly

41
Programming Language Levels
  • There are four programming language levels
  • machine language
  • assembly language
  • high-level language
  • fourth-generation language
  • Each type of CPU has its own specific machine
    language
  • The other levels were created to make it easier
    for a human being to write programs

42
Types of Languages
  • Machine - the commands understood by the CPU. The
    original programming language. All numeric. Need
    extensive knowledge about hardware
  • Example Opcode Param1 Param2
  • 85 FF 05 05 45

43
Languages continued
  • Assembly - Commands are mnemonics (STO - Store,
    ADD - add two values, FET - fetch a value from
    memory, etc.) Still need a lot of hardware
    knowledge.
  • Example Cmd Parameter1 Parameter2.
  • STO REG1 FF 06.
  • ADD REG1 REG2.

44
Languages continued
  • Pervious two languages could run without an OS.
  • High Level Languages - languages that compiled
    into machine language but are more human
    readable.
  • Examples FORTRAN, COBOL, C.
  • Concerned with processing steps.
  • Operating system handles I/O, storage, etc.

45
Languages continued
  • Example
  • int sum, x, y
  • x 56
  • y 76
  • sum x y
  • printf(Sum d\n,sum)

46
Compiled Software
Compiler
Source Code
OS
CPU
Executable
47
Languages
  • Interpreted languages - machine interprets
    commands as it receives them, 1 at a time.
  • Example BASIC.
  • New class over the last 4 years
  • Semi-interpreted language - JAVA.

48
Interpreted Language
OS
Interpreter
Source Code
CPU
49
Languages
  • Procedural vs. Object Oriented
  • Different ways to look at a problem
  • Procedural - steps needed to solve a problem
    (FORTRAN, BASIC, C)
  • Object Oriented - objects that interact within a
    program (JAVA, SmallTalk, C)

50
Types of Software
  • Business applications
  • Scientific applications
  • Industrial Control
  • Telecommunications
  • Embedded systems

51
Business Applications
  • MSOffice - word processing, spreadsheets,
    drawing, database
  • Netscape - email and web browsing
  • Netscape Composer - web page production

52
Scientific Applications
  • Statistical analysis
  • Visualization of data
  • Data collection
  • Simulation

53
Industrial Control
  • Programming of assembly lines or warehousing
  • Inventory tracking
  • Just In Time stock ordering
  • Process control analysis of defects

54
Telecommunications
  • Switch programming
  • Billing systems
  • Mobile phone systems

55
Embedded Systems
  • Systems with microprocessors embedded within
    them
  • Fire control panels
  • Telecommunication hardware
  • Digital imaging
  • Appliances
Write a Comment
User Comments (0)
About PowerShow.com