1
Introduction to Computers, the Internet and the Web
1
© 2007 Pearson Education, Inc. All rights reserved.
The chief merit of language is clearness.
Our life is frittered away by detail. …Simplify, simplify.
He had a wonderful talent for packing thought close, and rendering it portable.
2
© 2007 Pearson Education, Inc. All rights reserved.
Man is still the most extraordinary computer of all.
Things are always at their best in their beginning.
3
© 2007 Pearson Education, Inc. All rights reserved.
OBJECTIVES
In this chapter you will learn:
4
© 2007 Pearson Education, Inc. All rights reserved.
1.1 Introduction
1.2 What Is a Computer?
1.3 Computer Organization
1.4 Early Operating Systems
1.5 Personal, Distributed and Client/Server Computing
1.6 Machine Languages, Assembly Languages and�High-Level Languages
1.7 Fortran, COBOL, Pascal and Ada
1.8 History of C
1.9 C Standard Library
5
© 2007 Pearson Education, Inc. All rights reserved.
1.10 C++
1.11 Java
1.12 BASIC, Visual Basic, Visual C++, Visual C# and .NET
1.13 Key Software Trend: Object Technology
1.14 Typical C Program Development Environment
1.15 Hardware Trends
1.16 History of the Internet
1.17 History of the World Wide Web
1.18 Notes About C and This Book
1.19 Web Resources
6
© 2007 Pearson Education, Inc. All rights reserved.
1.1 Introduction
7
© 2007 Pearson Education, Inc. All rights reserved.
1.2 What is a Computer?
8
© 2007 Pearson Education, Inc. All rights reserved.
1.3 Computer Organization
9
© 2007 Pearson Education, Inc. All rights reserved.
1.4 Early Operating Systems
10
© 2007 Pearson Education, Inc. All rights reserved.
1.5 Personal Computing, Distributed Computing, and Client/Server Computing
11
© 2007 Pearson Education, Inc. All rights reserved.
1.6 Machine Languages, Assembly Languages, and High-level Languages
Three types of programming languages
+1300042774
+1400593419
+1200274027
LOAD BASEPAY
ADD OVERPAY
STORE GROSSPAY
12
© 2007 Pearson Education, Inc. All rights reserved.
1.6 Machine Languages, Assembly Languages, and High-level Languages
Three types of programming languages (continued)
grossPay = basePay + overTimePay
13
© 2007 Pearson Education, Inc. All rights reserved.
1.7 Fortran, COBOL, Pascal and Ada
14
© 2007 Pearson Education, Inc. All rights reserved.
1.7 Fortran, COBOL, Pascal and Ada
15
© 2007 Pearson Education, Inc. All rights reserved.
1.8 History of C
16
© 2007 Pearson Education, Inc. All rights reserved.
Portability Tip 1.1
Because C is a hardware-independent, widely available language, applications written in C can run with little or no modifications on a wide range of different computer systems.
17
© 2007 Pearson Education, Inc. All rights reserved.
1.9 C Standard Library
18
© 2007 Pearson Education, Inc. All rights reserved.
Performance Tip 1.1
Using Standard C library functions instead�of writing your own comparable versions can improve program performance, because these functions are carefully written to perform efficiently.
19
© 2007 Pearson Education, Inc. All rights reserved.
Portability Tip 1.2
Using Standard C library functions instead�of writing your own comparable versions can improve program portability, because these functions are used in virtually all Standard C implementations.
20
© 2007 Pearson Education, Inc. All rights reserved.
1.10 C++
21
© 2007 Pearson Education, Inc. All rights reserved.
1.11 Java
22
© 2007 Pearson Education, Inc. All rights reserved.
1.12 BASIC, Visual Basic, Visual C++, Visual C# and .NET
23
© 2007 Pearson Education, Inc. All rights reserved.
1.13 Key Software Trend: Object Technology
24
© 2007 Pearson Education, Inc. All rights reserved.
1.14 Typical C Program Development Environment
25
Fig. 1.1 | Typical C development environment.
© 2007 Pearson Education, Inc. All rights reserved.
Common Programming Error 1.1
Errors like division-by-zero occur as a program runs, so these errors are called runtime errors or execution-time errors. Divide-by-zero is generally a fatal error, i.e., an error that causes the program to terminate immediately without successfully performing its job. Nonfatal errors allow programs to run to completion, often producing incorrect results. [Note: On some systems, divide-by-zero is not a fatal error. Please see your system documentation.]
26
© 2007 Pearson Education, Inc. All rights reserved.
1.15 Hardware Trends
27
© 2007 Pearson Education, Inc. All rights reserved.
1.16 History of the Internet
28
© 2007 Pearson Education, Inc. All rights reserved.
1.17 History of the World Wide Web
29
© 2007 Pearson Education, Inc. All rights reserved.
1.18 General Notes About C�and This Book
30
© 2007 Pearson Education, Inc. All rights reserved.
Good Programming Practice 1.1
Write your C programs in a simple and straightforward manner. This is sometimes referred to as KIS (“keep it simple”). Do not “stretch” the language by trying bizarre usages.
31
© 2007 Pearson Education, Inc. All rights reserved.
Portability Tip 1.3
Although it is possible to write portable programs, there are many problems between different C compilers and different computers that make portability difficult to achieve. Simply writing programs in C does not guarantee portability. The progammer will often need to deal directly with complex computer variations.
32
© 2007 Pearson Education, Inc. All rights reserved.
Software Engineering Observation 1.1
Read the manuals for the version of C you are using. Reference these manuals frequently to be sure you are aware of the rich collection of C features and that you are using these features correctly.
33
© 2007 Pearson Education, Inc. All rights reserved.
Software Engineering Observation 1.2
Your computer and compiler are good teachers. If you are not sure how a feature of C works, write a sample program with that feature, compile and run the program and see what happens.
34
© 2007 Pearson Education, Inc. All rights reserved.