13317
13317
com
http://testbankbell.com/product/solution-manual-for-c-
programming-program-design-including-data-structures-6th-
edition-d-s-malik/
OR CLICK HERE
DOWLOAD NOW
https://testbankbell.com/product/solution-manual-for-c-programming-
from-problem-analysis-to-program-design-6th-edition-d-s-malik/
testbankbell.com
https://testbankbell.com/product/test-bank-for-c-programming-from-
problem-analysis-to-program-design-6th-edition-d-s-malik/
testbankbell.com
https://testbankbell.com/product/c-programming-from-problem-analysis-
to-program-design-8th-edition-malik-solutions-manual/
testbankbell.com
https://testbankbell.com/product/solution-manual-for-c-programming-
from-problem-analysis-to-program-design-5th-edition-barbara-doyle/
testbankbell.com
Solution Manual for Java Foundations: Introduction to
Program Design and Data Structures, 5th Edition, John
Lewis, Peter DePasquale, Joe Chase
https://testbankbell.com/product/solution-manual-for-java-foundations-
introduction-to-program-design-and-data-structures-5th-edition-john-
lewis-peter-depasquale-joe-chase/
testbankbell.com
https://testbankbell.com/product/solution-manual-for-revel-for-
introduction-to-python-programming-and-data-structures-y-daniel-liang/
testbankbell.com
Chapter 1
An Overview of Computers and Programming Languages
At a Glance
• Objectives
• Teaching Tips
• Quick Quizzes
• Additional Projects
• Additional Resources
• Key Terms
C++ Programming: Program Design Including Data Structures, Sixth Edition 1-2
Lecture Notes
Overview
The aim of this book is to teach your students to design and write programs in C++.
However, it is useful for them to understand the basic terminology and different
components of a computer before they begin programming. Chapter 1 describes the
main components of a computer system, the history and evolution of computer
languages, and some fundamental ideas about how to solve problems with computer
programming. It also introduces the structured design and object-oriented programming
methodologies. Finally, students will look at a C++ program, understand how it is
processed, and learn about the ANSI/ISO Standard C++.
Objectives
In this chapter, the student will:
• Learn about different types of computers
• Explore the hardware and software components of a computer system
• Learn about the language of a computer
• Learn about the evolution of programming languages
• Examine high-level programming languages
• Discover what a compiler is and what it does
• Examine a C++ program
• Explore how a C++ program is processed
• Learn what an algorithm is and explore problem-solving techniques
• Become aware of structured design and object-oriented design programming
methodologies
• Become aware of Standard C++ and ANSI/ISO Standard C++
Teaching Tips
Introduction
1. Discuss the numerous ways in which computers have affected our daily lives, including
communication, banking, and schoolwork. Emphasize that these are all made possible
by computer programs, which are developed with the help of programming languages.
Introduce this chapter with some real-world computer applications. Discuss the
relationship between the services that students might typically use when surfing
Teaching
the Internet and the implementation behind them. Use online stores such as
Tip
www.amazon.com, entertainment databases such as www.imdb.com, or an
online investment service such as www.etrade.com as examples.
C++ Programming: Program Design Including Data Structures, Sixth Edition 1-3
Hardware
1. Discuss the main hardware components of a computer. These include the central
processing unit (CPU), main memory, input/output devices, and secondary storage. Use
Figure 1-1 to illustrate how these components work together.
1. Explain that the CPU can be thought of as the brain of the computer and that it is also
the most expensive component.
The diagram on the following Web page illustrates how CPU components work
Teaching together: http://computer.howstuffworks.com/microprocessor2.htm. It might also
Tip be useful to show students an actual motherboard to acquaint them with the
innards of a computer.
2. Emphasize that all data must be brought into main memory before it can be processed
and that the information in main memory is lost when the computer is turned off.
3. Using Figure 1-1, discuss how main memory is ordered into a sequence of cells.
Secondary Storage
C++ Programming: Program Design Including Data Structures, Sixth Edition 1-4
Input/Output Devices
1. Explain how input and output devices are needed for a computer to perform useful
tasks.
2. Give some examples of input/output devices using the illustrations in Figure 1-2.
Novel input and output devices are appearing regularly. Here is one called
Teaching
"Skinput" that allows you to use the skin on your arm as a keyboard:
Tip
http://www.chrisharrison.net/index.php/Research/Skinput
Software
1. Define software as computer programs that are written to perform specific tasks. Give
some examples, such as a word processing program.
2. Describe and give examples of the two types of software programs: system and
application.
Quick Quiz 1
1. Main memory is an ordered sequence of cells called ____________________.
Answer: memory cells
3. True or False: Programs do not have to be loaded into main memory before they are
executed.
Answer: False
4. The devices that computers use to display results are called ____________________.
Answer: output devices
2. Describe the language of the computer, called machine language. Define the terms
binary digit (bit), binary code (binary number), and byte. Use Table 1-1 to illustrate the
terms used for various numbers of bytes.
3. Discuss the ASCII encoding scheme commonly used on computers. Explain how a
seven-bit ASCII character is converted into an eight-bit representation for computer
processing.
Show the ASCII character set in Appendix C to your students and talk about its
Teaching
organization. In particular, note the letters, numbers, and new line and tab
Tip
characters, as these characters will be useful in future programming assignments.
Quick Quiz 2
1. True or False: Analog signals represent information with a sequence of 0s and 1s.
Answer: False
2. Give a brief overview of machine language instructions using the example in the
textbook.
Teaching Point out that the process of writing programs in machine language was
Tip extremely tedious and error-prone.
C++ Programming: Program Design Including Data Structures, Sixth Edition 1-6
3. Give a brief overview of assembly language instructions using Table 1-2 and the sample
code in the text. Introduce the concept of a mnemonic.
2. Point out all C++ keywords and functions in this C++ program, such as #include,
using namespace, return, and cout. In addition, discuss C++ syntax, including
the use of braces, parentheses, and the stream insertion operator (<<).
3. Using Figure 1-3, review the steps required to process a program written in C++. Define
the terms source code (program), preprocessor, object program, library, linker, and
loader as you discuss the process.
Students are probably anxious about using a C++ SDK. Demonstrate how to use
Teaching the Visual C++ Express or Visual Studio .NET SDK with the program in the
Tip previous section. Explain the development process by pasting the code into the
text editor, compiling and building the project, and executing the program.
Quick Quiz 3
1. A C++ source program must be saved in a text file with a(n) ____________________
extension.
Answer: .cpp
3. True or False: A loader is a program that combines the object program with other
programs in the library.
Answer: False
Emphasize the need for problem analysis before coding with real-world
Teaching
examples, i.e., building an airplane or space shuttle. What might happen if
Tip
shortcuts are taken?
3. Illustrate how to design an algorithm in C++ using the Examples 1-1 through 1-5
presented in this section.
Programming Methodologies
1. This section introduces two popular approaches to programming design: structured
design and object-oriented design.
Structured Programming
Object-Oriented Programming
2. Use the video object example in the text to illustrate some possible data and operations
of objects.
3. Provide a brief overview of the subject matter that will be covered in subsequent
chapters, including C++ data types, functions, control structures, and classes. Finally,
emphasize that when programming in C++, OOD works well in conjunction with
structured design.
C++ Programming: Program Design Including Data Structures, Sixth Edition 1-8
Quick Quiz 4
1. What is another term for structured design?
Answer: top-down design, stepwise refinement, modular programming
2. In OOD, the first step in the problem-solving process is to identify the components
called ____________________.
Answer: objects
Discuss why the ANSI/ISO Standard makes for more robust and dependable
Teaching C++ programs, but that there may still be portability issues with older or
Tip noncompliant compilers. If possible, demonstrate this issue with a couple of
different compilers.
2. Many companies use internal programs that were implemented before object-oriented
programming came into widespread use. What are the issues involved in moving their
systems to an object-oriented approach?
Additional Projects
C++ Programming: Program Design Including Data Structures, Sixth Edition 1-9
1. Ask students to do some research and create a timetable that describes the evolution of
computer languages from machine language to the present day. The table does not have
to be comprehensive, but it should include approximately ten major languages. For each
language, they should include the creation date and author(s), a brief description, and
the state of its use today.
2. Ask your students how they would like their final class grade to be determined in terms
of the relative weight given to projects, weekly assignments, midterm, final, etc. Then,
ask them to design an algorithm to calculate their final grade using the percentages they
have chosen.
Additional Resources
1. History and evolution of computer languages:
www.scriptol.org/history.php
3. Object-oriented programming:
www.freetechbooks.com/introduction-to-object-oriented-programming-using-c-
t123.html
Key Terms
➢ Address (of a cell): a unique location in main memory for each cell
➢ Algorithm: a step-by-step problem-solving process in which a solution is arrived at in a
finite amount of time
➢ American Standard Code for Information Interchange (ASCII): the most
commonly used encoding scheme used on personal computers; the ASCII data set uses
seven bits to represent 128 characters, numbered from 0 to 127
➢ Analog signal: a continuous wave form used to represent such things as sound
➢ Application program: a software program that performs a specific task
➢ Assembler: a program that translates a program written in assembly language into an
equivalent program in machine language
➢ Binary (base 2): the number system that a computer uses
➢ Binary code (binary number): a sequence of 0s and 1s
➢ Binary digit (bit): the digit 0 or 1
➢ Bit: a binary digit 0 or 1
C++ Programming: Program Design Including Data Structures, Sixth Edition 1-10
➢ Build (Rebuild): the command that does the linking on Visual C++ and Visual
Studio .NET
➢ Byte: a sequence of eight bits
➢ Central processing unit (CPU): the brain of the computer and the single most
expensive piece of hardware in a personal computer
➢ Compiler: a program that translates instructions written in a high-level language into
the equivalent machine language
➢ Decimal system (base 10): the number system we use in daily life
➢ Digital signal: represents information with a sequence of 0s and 1s
➢ High-level language: a programming language that is similar to natural speaking
languages
➢ Input device: a device that feeds data and programs into a computer
➢ Kilobyte (KB): 1024, or 210 bytes
➢ Library: includes prewritten code
➢ Linker: a program that combines the object program with other programs in the library,
and is used in the program to create the executable code
➢ Loader: a program that loads an executable program into main memory
➢ Machine language: the language of a computer; a sequence of 0s and 1s
➢ Main memory: memory that is directly connected to the CPU
➢ Memory cells: an ordered sequence of cells in main memory
➢ Mnemonic: an instruction that is in an easy-to-remember form
➢ Object program: the machine language version of the high-level language program
➢ Object-oriented design (OOD): a programming methodology that identifies
components called objects, which form the basis of the solution to a problem
➢ Object-oriented programming (OOP) language: a programming language that
implements OOD
➢ Operating system: monitors the overall activity of the computer and provides services
➢ Output device: a device that the computer uses to display results
➢ Preprocessor: a program that processes statements in a C++ program that begin with
the symbol #
➢ Random access memory: memory that is directly connected to the CPU
➢ Secondary storage: a device that stores information permanently
➢ Source code (source program): a program that is written in a high-level language
➢ Structured design (top-down design, bottom-up design, stepwise refinement,
modular programming): the act of dividing a problem into smaller subproblems
➢ Structured programming: the process of implementing a structured design
➢ System program: a program that controls the computer
Random documents with unrelated
content Scribd suggests to you:
The Project Gutenberg eBook of
A Doctor in France, 1917-1919: The Diary of
Harold Barclay
This ebook is for the use of anyone anywhere in the United States
and most other parts of the world at no cost and with almost no
restrictions whatsoever. You may copy it, give it away or re-use it
under the terms of the Project Gutenberg License included with this
ebook or online at www.gutenberg.org. If you are not located in the
United States, you will have to check the laws of the country where
you are located before using this eBook.
Language: English
A DOCTOR IN FRANCE
1917 · 1919
A DOCTOR IN FRANCE
1917 · 1919
THE DIARY OF
HAROLD BARCLAY
Lieutenant-Colonel American Expeditionary Forces
NEW YORK
PRIVATELY PRINTED
1923