Java Software Solutions Foundations of Program Design

Slides:



Advertisements
Similar presentations
 2002 Prentice Hall Hardware Basics: Inside The Box Chapter 2.
Advertisements

Basic Computer Hardware and Software.
Chapter 1: Computer Systems
Hardware Basics: Inside the Box 2  2001 Prentice Hall2.2 Chapter Outline “There is no invention – only discovery.” Thomas J. Watson, Sr. What Computers.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Data Communications and Computer Networks
1 Networks & Data Representation Overview l Computer networks »Network connections »LANs »WANs l The internet. »Identifying computers on the internet »The.
Office 2003 Introductory Concepts and Techniques M i c r o s o f t CPTG104 Intro to Information Systems Dr. Hwang Essential Introduction to Computers.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Sixth Edition by Tony Gaddis, Judy Walters,
Hardware and Software ► Hardware  the physical, tangible parts of a computer  keyboard, monitor, disks, wires, chips, etc. ► Software  programs and.
1 12Lecture 15 The Internet Overview  Internet / Intranet  TCP/IP  IP address  IP address Classes  Calculating the IP address  Domain Names.
BBS Yapısal Programlama (Structured Programming)1 BBS 514 Yapısal Programlama (Structured Programming)
How Do Computers Work? A Gentle Introduction
UNIT 9 Computer architecture
Introduction to Computer Terminology
Hardware and Software Basics. Computer Hardware  Central Processing Unit - also called “The Chip”, a CPU, a processor, or a microprocessor  Memory (RAM)
V Material obtained from summer workshop in Guildford County.
Section 2.1 Identify hardware Describe processing components Compare and contrast input and output devices Compare and contrast storage devices Section.
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
How Do Computers Work? A Gentle Introduction Poly Pride.
Chapter Introduction to Computers and Programming 1.
 Chasis / System cabinet  A plastic enclosure that contains most of the components of a computer (usually excluding the display, keyboard and mouse)
An Introduction to Hardware, Software, and the Internet
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
© 2006 Pearson Education 1  Obj: 1.2, to understand networks HW: Review sheet  Quiz next class Sections 1.0 – 1.2  Do Now: p.47 #1.4 and 1.5 C1 D3.
INTRODUCTION TO COMPUTING
Ch Review1 Review Chapter Microcomputer Systems Hardware, Software, and the Operating System.
CPU (CENTRAL PROCESSING UNIT): processor chip (computer’s brain) found on the motherboard.
Fundamental Principles of Computer Systems Unit B, Objective 3.01 & 3.02.
What is a Computer ? Computers are Electronic Machines that process (performs calculation and manipulation) Data under the control of Set of Instructions.
Chapter 1: Introduction to Computers and Programming.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
Welcome to Computing Presentation slides modified by M. A. Papalaskari from “Java Software Solutions Foundations of Program Design (3 rd ed.)” by John.
CSC 1051 – Data Structures and Algorithms I Dr. Mary-Angela Papalaskari Department of Computing Sciences Mendel 162C Course website:
Computer Parts. Two Basic Parts Hardware & Software.
Course ILT Basics of information technology Unit objectives Define “information technology” (IT), distinguish between hardware and software, and identify.
Computers Are Your Future Eleventh Edition Chapter 2: Inside the System Unit Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall1.
Chapter 1 Introduction. © 2004 Pearson Addison-Wesley. All rights reserved1-2 Announcements The first Weekly Quiz will be available on Blackboard this.
MODULE 1 Computing Essentials © Paradigm Publishing, Inc.1.
1 Hardware and Software b Hardware the physical, tangible parts of a computerthe physical, tangible parts of a computer keyboard, monitor, wires, chips,
COMPUTER ARCHITECTURE. Recommended Text 1Computer Organization and Architecture by William Stallings 2Structured Computer Organisation Andrew S. Tanenbaum.
Computer Architecture
© 2011 Pearson Education, publishing as Addison-Wesley Chapter 1: Computer Systems Presentation slides for Java Software Solutions for AP* Computer Science.
Computer Basic Vocabulary
Development of Computers. Hardware 1. Original concept: Charles Babbage 1840’s 2. 4 basic components of a computer system: input store mill output (Now:
© 2011 Pearson Education, publishing as Addison-Wesley Monday  Class Requirements  Earn hawk points today with the Name Game  Network Login.
Chapter 1: Computer Systems Welcome to Intro to Java Programming Mrs. Vida.
© 2006 Pearson Education Chapter 1: Computer Systems.
1 A Computer Specification  Consider the following specification for a “simplified” personal computer: 950 MHz Pentium 4 Processor 512 MB RAM 30 GB Hard.
Chapter 1: Computer Systems Presentation slides for Java Software Solutions for AP* Computer Science by John Lewis, William Loftus, and Cara Cocking Java.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
A.Abhari CPS1251 Topic 1: Introduction to Computers Computer Hardware Computer components Connecting Computers Computer Software Operating System (OS)
Computer Systems. Bits Computers represent information as patterns of bits A bit (binary digit) is either 0 or 1 –binary  “two states” true and false,
Basic Computer Hardware and Software. Guilford County SciVis V
Basic Computer Hardware and Software.
Information Technology INT1001 Lecture 2 1. Computers Are Your Future Tenth Edition Chapter 6: Inside the System Unit Copyright © 2009 Pearson Education,
SEPTEMBER 8, 2015 Computer Hardware 1-1. HARDWARE TERMS CPU — Central Processing Unit RAM — Random-Access Memory  “random-access” means the CPU can read.
Programming with Java. Chapter 1 Focuses on: –components of a computer –how those components interact –how computers store and manipulate information.
Introduction to Programming. Key terms  CPU  I/O Devices  Main memory  Secondary memory  Operating system  User interface  Application  GUI 
Computer Graphics HARDWARE. Computers  Computers are automatic, electronic machines that –accept data & instructions from a user (INPUT) –store the data.
Basic Computer Hardware and Software.
UNIT 9 Computer architecture
Basic Computer Hardware & Software
Chapter 1: Computer Systems
Basic Computer Hardware and Software.
Chapter 1: Computer Systems
Chap 2. Computer Fundamentals
Data Communications and Computer Networks
Presentation transcript:

Java Software Solutions Foundations of Program Design presentation slides for Java Software Solutions Foundations of Program Design by John Lewis and William Loftus Published by Addison-Wesley

Copyright 1997 by John Lewis and William Loftus. All rights reserved. Focus of the course Program development problem solving program design and implementation object-oriented concepts steps in the development process the Java programming language Specific programming concepts and techniques data and operations decisions and loops objects and classes arrays, vectors, strings graphics Graphical User Interfaces sorting and searching Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 2 2

Computer Systems -- Introduction Before we can dive into programming, we need to understand the fundamentals of computers in general Chapter 1 focuses on: components of a computer how those components interact how computers store and process information computer networks the Internet and the World Wide Web Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 3

Copyright 1997 by John Lewis and William Loftus. All rights reserved. Hardware and Software Hardware the physical, tangible parts of a computer keyboard, monitor, wires, chips, disks 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 Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 4

Copyright 1997 by John Lewis and William Loftus. All rights reserved. Hardware Components Central Processing Unit (CPU) the chip that executes program commands Intel Pentium processor, Sun Sparc processor Input / Output devices allow interaction with the user keyboard, monitor, mouse Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 5

Copyright 1997 by John Lewis and William Loftus. All rights reserved. Hardware Components Main memory the primary storage area for programs and data in active use Secondary memory devices long-term storage floppy disks, hard disks, tapes Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 6

Copyright 1997 by John Lewis and William Loftus. All rights reserved. Hardware Interaction Hard disk Main memory Floppy Keyboard CPU Monitor Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 7

Copyright 1997 by John Lewis and William Loftus. All rights reserved. Software Categories Operating system controls all machine activities provides the user interface to the computer manages resources such as the CPU and memory Windows 95, Solaris, Mac OS Application program generic term for any other kind of software word processors, missile control systems, games Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 8

Copyright 1997 by John Lewis and William Loftus. All rights reserved. Analog vs. Digital There are two basic ways to store and manage data Analog continuous, in direct proportion to the data represented example: a mercury thermometer - the mercury rises in direct proportion to the temperature Digital the information is broken down into pieces, and each piece is represented separately example: music on a CD Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 9

Copyright 1997 by John Lewis and William Loftus. All rights reserved. Digital Information Modern computers store all information digitally, including: numbers text graphics and pictures audio video program instructions In some way, all information is digitized - broken down into pieces and represented as numbers Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 10

Representing text digitally Each character, including spaces, digits, and punctuation, is stored as a number Corresponding upper and lower case letters are separate characters H i , H e a t h e r . 72 105 44 32 72 101 97 116 104 101 114 46 Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 11

Copyright 1997 by John Lewis and William Loftus. All rights reserved. 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 larger values Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 12

Copyright 1997 by John Lewis and William Loftus. All rights reserved. Bit Permutations 1 bit 2 bits 3 bits 4 bits etc. Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 13

Copyright 1997 by John Lewis and William Loftus. All rights reserved. Bit Permutations Each bit that is added to the string doubles the number of states or items that can be represented N bits can represent 2N unique items 1 bit 21 = 2 items 2 bits 22 = 4 items 3 bits 23 = 8 items 4 bits 24 = 16 items 5 bits 25 = 32 items Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 14

Computer Architecture Now we can examine the hardware components of a computer in more detail The CPU and main memory are the two key hardware components All other devices can be considered peripherals Controllers coordinate the activities of specific peripherals Binary information moves between devices across a group of wires called a bus Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 15

Computer Architecture CPU Main memory bus Video controller Disk controller Controller Monitor Hard disk Floppy disk other peripherals Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 16

Copyright 1997 by John Lewis and William Loftus. All rights reserved. Memory Main memory is divided into many memory locations Each memory location has an address which uniquely identifies it Data is stored in one or more consecutive memory locations On most computers, each memory location holds 8 bits, or 1 byte Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 17

Copyright 1997 by John Lewis and William Loftus. All rights reserved. Memory address 9278 9279 9280 9281 9282 9283 9284 9285 9286 large values are stored in consecutive memory locations Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 18

Copyright 1997 by John Lewis and William Loftus. All rights reserved. Storage Capacity Each memory device has a storage capacity, indicating the number of bytes it can hold Capacities are expressed in various units of binary storage: Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 19

Copyright 1997 by John Lewis and William Loftus. All rights reserved. Memory Main memory is volatile - stored information is lost if the electric power is removed Secondary memory devices are nonvolatile Main memory and disks are random access devices, which mean that information can be reached directly A magnetic tape is a sequential access device since its data is arranged in a linear order - you must get by the intervening data in order to access other information Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 20

Copyright 1997 by John Lewis and William Loftus. All rights reserved. RAM vs. ROM RAM - Random Access Memory 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 access devices! RAM should probably be called Read-Write Memory Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 21

The Central Processing Unit (CPU) A CPU is also called a microprocessor It retrieves, interprets, and executes instructions, one after another, continuously This process is called the fetch-decode-execute cycle The CPU contains: control unit - coordinates processing steps registers - small storage areas arithmetic / logic unit - performs calculations and decisions Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 22

The Central Processing Unit CPU Arithmetic / Logic unit Main memory Control unit Registers Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 23

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) Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 24

A Computer Specification Consider the following specification for a personal computer: 200 MHz Pentium Processor 32 MB RAM 2.3 GB Hard Disk 12x speed CD ROM Drive 17” Multimedia Video Display with 1280 x 1024 resolution 33,600 bps Data / Fax Modem Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 25

Copyright 1997 by John Lewis and William Loftus. All rights reserved. Monitor The primary output device listed in the specification is a 17” monitor The size is measured diagonally, like a television screen It has multimedia capabilities: text, graphics, video, etc. It has a resolution of 1280 by 1024 pixels High resolution (more pixels) produces sharper pictures Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 26

Copyright 1997 by John Lewis and William Loftus. All rights reserved. Modem Data transfer devices allow information to be sent and received between computers The computer specification includes a modem, which allows information to be moved across a telephone line It can send and receive fax documents as well as basic data It transfers information at a rate of 33,600 bits per second (bps) Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 27

Copyright 1997 by John Lewis and William Loftus. All rights reserved. Networks A network is two or more computers connected together so that information and resources can be shared Most computers are connected to some kind of network Each computer has its own network address, which uniquely identifies it among the others A file server is a network computer dedicated to storing programs and data that are shared among network users A file server often has a large amount of secondary memory Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 28

Copyright 1997 by John Lewis and William Loftus. All rights reserved. Network Connections There are many techniques for connecting computers into networks Point-to-point connections - each computer is directly connected to each other This technique is not feasible for more than a few close machines Adding a new computer requires a new communication line for each computer already in the network Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 29

Copyright 1997 by John Lewis and William Loftus. All rights reserved. Network Connections Most modern networks share a single communication line Adding a new computer to the network is relatively easy The shared communication line must be managed carefully Network users must take turns using the line, which introduces delays Often information is broken down into parts, sent to the receiving machine, and reassembled Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 30

Copyright 1997 by John Lewis and William Loftus. All rights reserved. Network Connections Point-to-Point Shared Line Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 31

Copyright 1997 by John Lewis and William Loftus. All rights reserved. LANs and WANs A local-area network (LAN) is designed to cover small distances and a small number of computers A LAN often connects the machines in a single room or building A wide-are network (WAN) connects two or more LANs, often over long distances Individual LANs are usually owned by a single organization, but WANs often connect LANs from many different groups in many different countries Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 32

Copyright 1997 by John Lewis and William Loftus. All rights reserved. LANs and WANs Long-distance connection LAN LAN Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 33

Copyright 1997 by John Lewis and William Loftus. All rights reserved. The Internet The Internet is a WAN which spans the entire planet The word Internet comes from the term internetworking, which implies a network of networks It started as a United States government project, sponsored by the Advanced Research Projects Agency (ARPA), and was originally called the ARPANET The Internet grew quickly throughout the 1980s and 90s Less than 600 computers were connected to the Internet in 1983; now there are over 10 million Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 34

Copyright 1997 by John Lewis and William Loftus. All rights reserved. The Internet The software which manages Internet communication is called TCP/IP The programs in the Internet Protocol (IP) formats the information for transfer The programs in the Transmission Control Protocol (TCP) reassembles messages and handles lost information Each computer on the Internet has a unique IP address, such as: 204.192.116.2 Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 35

Copyright 1997 by John Lewis and William Loftus. All rights reserved. The Internet Most computers also have a unique Internet name, which is also referred to as an Internet address: renoir.vill.edu kant.wpllabs.com The first part indicates a particular computer (renoir) The rest is the domain name, indicating the organization (vill.edu) Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 36

Copyright 1997 by John Lewis and William Loftus. All rights reserved. The Internet The last section of each domain name usually indicates the type of organization: edu - educational institution com - commercial business org - non-profit organization Sometimes the suffix indicates the country: uk - United Kingdom New suffix categories are being considered Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 37

Copyright 1997 by John Lewis and William Loftus. All rights reserved. Internet A domain name can have several parts Unique domain names mean that multiple sites can have individual computers with the same local name When used, an Internet address is translated to an IP address by software called the Domain Name System (DNS) There is not a one-to-one correspondence between the sections of an IP address and the sections of an Internet address Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 38

Copyright 1997 by John Lewis and William Loftus. All rights reserved. The World-Wide Web The World-Wide Web allows many different types of information to be accessed using a common interface A browser is a program which accesses and presents information: text, graphics, sound, audio, and programs A Web document usually contains links to other Web documents, creating a hypermedia environment The term Web comes from the fact that information is not organized in a linear fashion Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 39

Copyright 1997 by John Lewis and William Loftus. All rights reserved. The World-Wide Web Web documents are defined by the HyperText Markup Language (HTML) Information on the Web is found using a Uniform Resource Locator (URL): http://www.lycos.com A URL may indicate an HTML document, or some other kind of information Chapter 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 40