Programming Languages Chapter 1 Programming From Problem Analysis Program Design Eighth Edition Overview Computers And

subject Type Homework Help
subject Pages 9
subject Words 1491
subject Authors D. S. Malik

Unlock document.

This document is partially blurred.
Unlock all pages and 1 million more documents.
Get Access
page-pf1
C++ Programming: From Problem Analysis to Program Design, Eighth Edition 1-1
Chapter 1
An Overview of Computers and Programming Languages
A Guide to this Instructor’s Manual:
We have designed this Instructor’s Manual to supplement and enhance your teaching
experience through classroom activities and a cohesive chapter summary.
This document is organized chronologically, using the same headings that you see in the
textbook. Under the headings, you will find lecture notes that summarize the section, Teacher
At a Glance
Instructor’s Manual Table of Contents
Overview
Objectives
Teaching Tips
Quick Quizzes
page-pf2
C++ Programming: From Problem Analysis to Program Design, Eighth 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++, C++11, and C++14.
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++, ANSI/ISO Standard C++, C++11, and C++14
Teaching Tips
Introduction
1. Discuss the numerous ways in which computers have affected our daily lives, including
communications, banking, and course work. Emphasize that these are all made possible
by computer programs, which are developed with the help of programming languages.
page-pf3
C++ Programming: From Problem Analysis to Program Design, Eighth Edition 1-3
Teaching
Tip
Introduce this chapter with some real-world computer applications. Discuss the
relationship between the services that students might typically use when surfing
the Internet and the implementation behind them. Use online stores such as
https://www.amazon.com/, entertainment databases such as
http://www.imdb.com/, or an online investment service such as
https://us.etrade.com/b/home as examples.
A Brief Overview of the History of Computers
1. Describe the evolution of computers from the abacus to the present. Explain that at first,
2. Mention several categories of computers, including mainframes, midsize, and
microcomputers.
Teaching
Tip
Computer technology is changing rapidly. Ask students to compare their first
computer with the one they currently use and discuss the similarities and
differences between the two.
Elements of a Computer System
1. Describe the basic commands that a computer performs: input, output, storage, and
Hardware
1. Discuss the main hardware components of a computer. These include the central
Central Processing Unit and Main Memory
1. Explain that the CPU can be thought of as the brain of the computer and that it is also
the most expensive component.
Teaching
Tip
The diagram on the following Web page illustrates how CPU components work
together: http://computer.howstuffworks.com. It might also be useful to show
students an actual motherboard to acquaint them with the innards of a computer.
page-pf4
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.
Secondary Storage
1. Explain why secondary storage is necessary to retain information permanently.
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.
Teaching
Tip
Novel input and output devices are appearing regularly. Here is one called
"Skinput" that allows you to use the skin on your arm as a keyboard:
http://www.chrisharrison.net/index.php/Research/Skinput.
Software
2. Describe and give examples of the two types of software programs: system and
Quick Quiz 1
1. Main memory is an ordered sequence of cells called ____________________.
2. True or False: Main memory stores numbers and letters.
3. True or False: Programs do not have to be loaded into main memory before they are
executed.
4. The devices that computers use to display results are called ____________________.
page-pf5
The Language of a Computer
1. Define analog and digital electrical signals and explain the difference between the two.
Explain why computers use digital signals.
2. Describe the language of the computer, called machine language. Define the terms
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.
Teaching
Tip
Show the ASCII character set in Appendix C to your students and talk about its
organization. In particular, note the letters, numbers, and new line and tab
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.
2. A(n) ____________________ is 1,024 bytes.
3. The basic language of a computer is called ____________________.
4. How do you convert a seven-bit binary representation of an ASCII character to an eight-
bit binary representation?
The Evolution of Programming Languages
2. Give a brief overview of machine language instructions using the example in the
textbook.
page-pf6
page-pf7
C++ Programming: From Problem Analysis to Program Design, Eighth Edition 1-7
© 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use.
Answer: False
Programming with the Problem Analysis-Coding-Execution Cycle
1. Define the term algorithm and describe the three-step problem-solving process in a
programming environment.
2. Discuss the components of the problem analysis-coding-execution cycle using
Figure 1-3.
Teaching
Tip
Emphasize the need for problem analysis before coding with real-world
examples, i.e., building an airplane or space shuttle. What might happen if
shortcuts are taken?
Programming Methodologies
1. This section introduces two popular approaches to programming design: structured
Structured Programming
1. Define structured design as dividing a problem into smaller subproblems. Further
Object-Oriented Programming
1. Spend a considerable amount of time introducing object-oriented design. Explain that
the first step in the process is to identify components called objects, which form the
2. Use the video object example in the text to illustrate some possible data and operations
of objects.
page-pf8
C++ Programming: From Problem Analysis to Program Design, Eighth Edition 1-8
Teaching
Tip
Object-oriented design may be initially difficult for your students to grasp.
Illustrate the concept of an object further by using a music app such as Google
Play. Show the app on a device and search for the songs of a favorite artist. Ask
students to think of the song as an object and to describe both its data and its
operations.
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,
Quick Quiz 4
1. What is another term for structured design?
2. In OOD, the first step in the problem-solving process is to identify the components
called ____________________.
3. True or False: An object consists of data and operations on that data.
4. True or False: C++ was designed especially to implement OOD.
ANSI/ISO Standard C++
1. Discuss the history of C++ and how the C++ language evolved in slightly different
ways, depending on the compiler. Explain that before ANSI/ISO Standard C++,
programmers were not assured that their program would run in a different environment
from the one on which it was developed.
2. In 2011, the second standard of C++ was approved. The main objective of this standard,
referred to as C++11, is to make the C++ code cleaner and more effective. C++14 was
approved as an update in 2014.
page-pf9
C++ Programming: From Problem Analysis to Program Design, Eighth Edition 1-9
Teaching
Tip
Discuss why the ANSI/ISO Standard makes for more robust and dependable
C++ programs, but that there may still be portability issues with older or
noncompliant compilers. If possible, demonstrate this issue with a couple of
different compilers.
Class Discussion Topics
1. Ask your students to talk about any previous programming experience they might have
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
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
2. Ask your students how they would like their final class grade to be determined in terms
Additional Resources
1. History and evolution of computer languages:
2. A list of applications written in C++:
3. ASCII table and description:
page-pfa
4. An illustrated history of computers:
5. An overview of the upcoming C++17 standard:
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
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
Build (Rebuild): the command that does the linking on Visual C++ and Visual
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
page-pfb
© 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use.
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 #

Trusted by Thousands of
Students

Here are what students say about us.

Copyright ©2022 All rights reserved. | CoursePaper is not sponsored or endorsed by any college or university.