|
|
|
|
|
|
|
We think nothing of turning on the television and sitting down to watch it. It's a communication tool we use to enhance our lives. Computers are becoming as common as televisions, just a normal part of our lives. And like televisions, computers are based on complex principles but are designed for easy use. |
|
|
|
|
|
|
|
|
Computers are dumb; they must be told what to do. A true computer error is extremely rare (usually due to a component malfunction or an electrical fault). Because we tell the computer what to do, most errors in computergenerated output are really human errors. |
|
|
|
|
|
|
|
|
Computer programming is the process of planning a sequence of steps for a computer to follow. It involves a problem-solving phase and an implementation phase. After analyzing a problem, we develop and test a general solution (algorithm). This general solution becomes a concrete solutionour programwhen we write it in a high-level programming language. The sequence of instructions that makes up our program is then compiled into machine code, the language the computer uses. After correcting any errors or bugs that show up during testing, our program is ready to use. |
|
|
|
|
|
|
|
|
Data and instructions are represented as binary numbers (numbers consisting of just Is and Os) in electronic computers. The process of converting data and instructions into a form usable by the computer is called coding. |
|
|
|
|
|
|
|
|
A programming language reflects the range of operations a computer can perform. The basic control structures in a programming language sequence, selection, loop, and subprogramare based on these fundamental operations. In this text, you will learn to write programs in the high-level programming language called C++. |
|
|
|
|
|
|
|
|
Computers are composed of six basic parts: the memory unit, the arithmetic/logic unit, the control unit, input and output devices, and auxiliary storage devices. The arithmetic/logic unit and control unit together are called the central processing unit. The physical parts of the computer are called hardware. The programs that are executed by the computer are called software. |
|
|
|
|
|
|
|
|
System software is a set of programs designed to simplify the user/computer interface. It includes the compiler, the operating system, and the editor. |
|
|
|
|
|
|
|
|
We've said that problem solving is an integral part of the programming process. Although you may have little experience programming computers, you have lots of experience solving problems. The key is to stop and think about the strategies you use to solve problems, and then to use those strategies to devise workable algorithms. Among those strategies are asking questions, looking for things that are familiar, solving by analogy, applying |
|
|
|
|
|