Chapter 1 Overview of Computers and Programming. 1-1 Outline 1.1 ELECTRONIC COMPUTERS THEN AND NOW 1.2 COMPUTERS HARDWARE 1.3 COMPUTERS SOFTWARE 1.4 THE.

Slides:



Advertisements
Similar presentations
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Advertisements

Lecture 1: Overview of Computers & Programming
C OMPUTING E SSENTIALS Timothy J. O’Leary Linda I. O’Leary Presentations by: Fred Bounds.
ICS103 P ROGRAMMING IN C L ECTURE 1: O VERVIEW OF C OMPUTERS & P ROGRAMMING.
Chapter 1: An Overview of Computers and Programming Languages J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program.
© 2010 Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of Chapter 1: Overview of Computers and Programming Problem Solving &
CS 201 Overview of Computers & Programming Debzani Deb.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Data Communications and Computer Networks
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
Chapter 1: An Overview of Computers and Programming Languages
Introduction to C++ Programming CS 117 Section 2 and KNET Sections Spring 2001 MWF 1:40-2:30.
1 System Software “Background software”, manages the computer’s internal resources.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages C++ Programming:
Topic 1: Introduction to Computers and Programming
CIS 260 Computer Programming I in C Prof. Timothy Arndt.
CS 115 Chapter 1 Overview of Programming and Problem Solving.
chap1 Computer Programming Fall 2006 李秀惠
CS102 Introduction to Computer Programming
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
CS 161 INTRO TO PROGRAMMING I Dr. Blaise W. Liffick Fall
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers, Problem Solving, and Programming Problem.
Chapter Introduction to Computers and Programming 1.
Introduction to Programming Dr Masitah Ghazali Programming Techniques I SCJ1013.
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
COMPUTER SOFTWARE Section 2 “System Software: Computer System Management ” CHAPTER 4 Lecture-6/ T. Nouf Almujally 1.
1 CSC 1401 S1 Computer Programming I Hamid Harroud School of Science and Engineering, Akhawayn University
An Overview of Using Computers
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Chapter 1: Introduction to Computers and Programming.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
CISC105 General Computer Science Class 1 – 6/5/2006.
Chapter 1 Overview of Computers and Programming J. H. Wang ( 王正豪 ), Ph. D. Assistant Professor Dept. Computer Science and Information Engineering National.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
Mrs. Ulshafer August, 2013 Java Programming Chapter 1.
Intro to Computers Computer Applications. What is a Computer? Initially the term computer referred to an individual whose job it was to perform mathematical.
Computer Architecture
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:
1 st Semester Introduction to Computer and Programming Computer Engineering Department Kasetsart University, Bangkok, THAILAND.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
Chapter 1 : Overview of Computer and Programming By Suraya Alias
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)
Computers and Programming ผศ. ดร. อนันต์ ผลเพิ่ม Anan Phonphoem
Chapter 1 An Overview of Computers and Programming Languages.
CHAPTER 1: OVERVIEW OF COMPUTERS AND PROGRAMMING Prepared By: Pn. Nik Maria Nik Mahamood Reference: Hanly, Koffman, C Problem Solving and Program Design.
C++ Programming: From Problem Analysis to Program Design, Fifth Edition Chapter 1: An Overview of Computers and Programming Languages.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Overview of Computers and Programming Problem Solving and Program.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
1 Chapter 1 Background Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
CHAPTER 1 OVERVIEW OF COMPUTER AND PROGRAMMING 1.1 Electronic Computer Then and Now 1.2 Computer Hardware 1.3 Computer Software 1.4 The Software Development.
Problem Solving and Program Design in C Chap. 1 Overview of Computers and Programming Chow-Sing Lin.
Chapter 1: Introduction to Computers, Problem Solving, and Programming
CHAPTER 1: OVERVIEW OF COMPUTERS AND PROGRAMMING
Chapter 1: An Overview of Computers and Programming Languages
Chapter 1: An Overview of Computers and Programming Languages
Overview of Computers and Programming Chapter 1
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Chapter 1: An Overview of Computers and Programming Languages
C++ Programming: From Problem Analysis to Program Design
Overview of Computers and Programming
UNIV 103 CS Majors Seminar Dr. Blaise W. Liffick Fall 2017.
Overview of Computers & Programming Languages
Computer Science I CSC 135.
Computers: Hardware and Software
Data Communications and Computer Networks
Computer components is a programmable machine that receives input, stores and manipulates data, and provides output in a useful format. Computer The computer.
ICS103 Programming in C 1: Overview of Computers And Programming
Presentation transcript:

Chapter 1 Overview of Computers and Programming

1-1 Outline 1.1 ELECTRONIC COMPUTERS THEN AND NOW 1.2 COMPUTERS HARDWARE 1.3 COMPUTERS SOFTWARE 1.4 THE SOFTWARE DEVELOPING METHOD 1.5 APPLYING THE SOFTWARE DEVELOPMENT METHOD CASE STUDY: CONVERTING MILES TO KILOMETERS

ELECTRONIC COMPUTERS THEN AND NOW 1930 – the first electronic computer 1946 – ENIAC Today – microprocessor chip (Figure1.1)

1-3 Figure 1.1 The Intel Pentium 4 Processor chip is an integrated circuit containing the full circuitry of a central processing unit. This processor can execute a simple instruction such as an integer addition in one six-billionth of a second. (Reprinted by permission of Intel Corporation, © Intel Corporation 2003)

1-4 Modern computer categories Personal computer (Figure1.2) Mainframe –Used in large real-time transaction processing Supercomputer –Used in computationally intensive applications

1-5 Figure 1.2 (a) Notebook Computer (ThinkPad®, Courtesy of IBM). (b) Palmtop Computer (Sony Clié PDA ®, Courtesy of Sony). (c) Desktop Computer (IBM NetVista Desktop, Courtesy of IBM).

1-6 Computer System Major Category Hardware – actual computer equipment Software – the set of programs

COMPUTERS HARDWARE Computer essential component –Main memory –Secondary memory –CPU –Input devices –Output devices

1-8 Figure 1.3 Components of a Computer

1-9 Memory Memory cell –an individual storage location Address –relative position in memory Contents –the data stored in a memory cell Stored program concept –an ability to store program instructions in main memory for execution

1-10 Figure Memory Cells in Main Memory

1-11 Bytes and Bits Byte –the amount of storage Bit (binary digit) –The smallest element a computer can deal with –8 bits = 1 byte

1-12 Figure 1.5 Relationship Between a Byte and a Bit

1-13 Storage and Retrieval of Information in Memory Data storage –Setting the individual bits of a memory cell to 0 or 1, destroying its previous contents Data retrieval –Copying the contents of a particular memory cell to another storage area

1-14 Main memory RAM (random access memory) –stores programs and data temporarily –volatile memory ROM (read-only memory) –stores programs and data permanently

1-15 Secondary Storage Devices Disk –Thin platter of metal or plastic on which data are represented by magnetized spots arranged in tracks CD drives –Uses a laser to access or store data in CD DVD –Silver plastic platter with up to 17GB of data storage

1-16 Figure 1.6 Secondary Storage Media

1-17 CPU CPU two roles –Coordinating all computer operations –Performing arithmetic and logical operations on data Fetching an instruction –Retrieving an instruction in sequence from main memory

1-18 Input/Output Devices Cursor –A moving place maker that appears on the monitor Function keys –Special keyboard keys used to select a particular operation Icon –A picture representing a computer operating

1-19 Figure 1.7 Keyboard for IBM-Type Computers

1-20 Computer Networks(1/2) LAN (Figure 1.8~1.9) File server –The computer in a network that controls access to a secondary storage device such as a hard disk Wide Area Network (WAN) –A network such as the Internet that connects computers and LANs over a large geographic area World Wide Web (WWW) –A part of the Internet whose graphical user interfaces make associated network resources easily navigable.

1-21 Computer Networks(2/2) GUI –Pictures and menus displayed to allow user to select command and data MODEM –A device that converts binary data into audio signals that can be transmitted between computers over telephone lines. Digital Subscriber Line (DSL) –A high-speed Internet connection that uses a telephone line and does not interfere with simultaneous voice communication on the same line. Cable Internet access –Two-way high-speed transmission of Internet data through two of the hundreds of channels available over the coaxial cable that carries cable television signals.

1-22 Figure 1.8 Local Area Network

1-23 Figure 1.9 A Wide Area Network with Satellite Relays of Microwave Signals

COMPUTERS SOFTWARE Operating system Booting the computer Operating system’s responsibility –Communicating with the computer user –Managing allocation of memory –Collecting input from input devices –Conveying program output to the output devices –Accessing data from secondary storage –Writing data to secondary storage

1-25 Figure 1.10 Entering a UNIX Command for Directory Display

1-26 Figure 1.11 Accessing Disk Drive through Windows

1-27 Application Software Application programs are developed to assist a computer user in accomplishing specific tasks. –Ex: Microsoft Word, Excel,…etc

1-28 Computer Languages Machine language –Binary number codes understood by a specific CPU Assembly language –Mnemonic codes that corresponding to machine language instructions High-level language (Table p.17) –Machine-independent programming language that combines algebraic expressions and English symbols. Such as FORTRAN, COBOL, LISP, C, Prolog, Ada, Smalltalk, C++, Java

1-29 Figure 1.12 Entering, Translating, and Running a High-Level Language Program name.obj: file of machine language instructions

1-30 Computer Program(1/3) Source file –File containing a program written in high-level language –The input for a compiler Compiler –Translates a high-level language program into machine language

1-31 Computer Progarm(2/3) Object file –File of machine language instructions that is the output of a compiler Linker –Combines object files and resolves cross-references to create an executable machine language program

1-32 Computer Progarm(3/3) Loader –Copies executable files into memory –Initiates execution of instructions Integrated development environment (IDE) –Software package combining a word processor, compiler, and tools for finding errors

1-33 Figure 1.13 Flow of Information During Program Execution already stored in memory

THE SOFTWARE DEVELOPMENT METHOD (1/3) 1.Specify the problem requirements –State the problem clearly and gain a clear understanding of what is required for its solutions –Eliminate unimportant aspects

THE SOFTWARE DEVELOPMENT METHOD (1/3) 2. Analyze the problem –Identify the problem Input : The data you have to work with Output : The desired result Additional requirements or constraints Example : Compute and display the total cost of apples given the number of pounds of apples purchased and the cost per pound of apples problem output problem input Total cost = Unit cost ×Number of units Total cost of apples= Cost per pound ×Number of apples

1-36 THE SOFTWARE DEVELOPMENT METHOD (2/3) 3.Design the algorithm to solve the problem –Develop a list of steps (called algorithm) to solve the problem and to then verify that the algorithm solves the problem as intended. –Algorithm for a programming problem Get the data Perform the computations Display the results –Writing the algorithm is often the most difficult part of the problem-solving process. –Top-down design : Start with the list of major steps. Followed by develop a more detail steps for each major step. Algorithm refinement – Development of a detailed list of steps to solve a particular step in the original algorithm.

1-37 THE SOFTWARE DEVELOPMENT METHOD (3/3) 4.Implement the algorithm –Convert each algorithm step into one or more statements in a programming language 5.Test and verify the completed program –Testing the completed program to verify that it works as desired –Run the program several times using different set of data to make sure that it works correctly for every situation provided for in the algorithm. 6.Maintain and update the program –Modify a program to remove previously undetected errors and to keep it up-to-date

APPLYING THE SOFTWARE DEVELOPMENT METHOD CASE STUDY CONVERTING MILES TO KILOMETERS

Problem (Specify the problem requirements) –Your summer surveying job requires you to study some maps that gives distances in kilometers and some use miles. You and your coworkers prefer to deal in metric measurements. Write a program that performs the necessary conversion. 2.Analysis (Analyze the problem) –Purpose : Conversion from miles to kilometers. –To solve this problem, you need to know the relationship between miles and kilometers. –Data Requirements Problem input : miles /* The distances in miles */ Problem output : kms /* The distances in kilometers */ Relevant Formula : 1 mile = kilometers

Design (Design the algorithm to solve the problem) –Algorithm 1.Get the distance in miles 2.Convert the distance to kilometers 3.Display the distance in kilometers –Algorithm with refinements 1.Get the distance in miles 2.Convert the distance to kilometers 2.1 The distance in kilometers is times the distance in miles 3.Display the distance in kilometers 4.Implementation (Figure 1.14) 5.Testing

1-41 Figure 1.14 Miles-to-Kilometers Conversion Program Step 1 Step 2 Step 3

1-42 Question? A good question deserve a good grade…