• wonderlic tests
  • EXAM REVIEW
  • NCCCO Examination
  • Summary
  • Class notes
  • QUESTIONS & ANSWERS
  • NCLEX EXAM
  • Exam (elaborations)
  • Study guide
  • Latest nclex materials
  • HESI EXAMS
  • EXAMS AND CERTIFICATIONS
  • HESI ENTRANCE EXAM
  • ATI EXAM
  • NR AND NUR Exams
  • Gizmos
  • PORTAGE LEARNING
  • Ihuman Case Study
  • LETRS
  • NURS EXAM
  • NSG Exam
  • Testbanks
  • Vsim
  • Latest WGU
  • AQA PAPERS AND MARK SCHEME
  • DMV
  • WGU EXAM
  • exam bundles
  • Study Material
  • Study Notes
  • Test Prep
Please log in to purchase this document.

Self-Review Exercises

Testbanks Dec 29, 2025
Loading...

Loading document viewer...

Page 0 of 0

Document Text

C++ How to Program, 10e Paul Deitel, Harvey Deitel

(Solutions Manual All Chapter)

(For Complete File Download link at the end of this File) 1 / 4

  • Chapter 1 Introduction to Computers and C++
  • Self-Review Exercises

1.1Fill in the blanks in each of the following statements:

a) Computers process data under the control of sets of instructions called .

ANS:programs.

b) The key logical units of the computer are the , , , ,

and .ANS:input unit, output unit, memory unit, central processing unit, arithmetic and logic unit, secondary storage unit.

c) The three types of languages discussed in the chapter are , and

.

ANS:machine languages, assembly languages, high-level languages.

d) The programs that translate high-level language programs into machine language are

called .

ANS:compilers.

  • is an operating system for mobile devices based on the Linux kernel and Java.

ANS:Android.

  • software is generally feature complete and (supposedly) bug free and ready for
  • use by the community.

ANS:Release candidate.

g) The Wii Remote, as well as many smartphones, uses a(n)

which allows the de- vice to respond to motion.

ANS:accelerometer.

1.2Fill in the blanks in each of the following sentences about the C++ environment.

a) C++ programs are normally typed into a computer using a(n)

program.

ANS:editor.

b) In a C++ system, a(n) program executes before the compiler’s translation

phase begins.

ANS:preprocessor.

c) The

program combines the output of the compiler with various library func- tions to produce an executable program.

ANS:linker.

d) The

program transfers the executable program from disk to memory.

ANS:loader.

1.3Fill in the blanks in each of the following statements (based on Section 1.8):

a) Objects have the property of —although objects may know how to commu-

nicate with one another across well-defined interfaces, they normally are not allowed to know how other objects are implemented.

ANS:information hiding.

b) C++ programmers concentrate on creating

, which contain data members and the member functions that manipulate those data members and provide services to clients.

ANS:classes.

c) The process of analyzing and designing a system from an object-oriented point of view

is called .

ANS:object-oriented analysis and design (OOAD).

d) With , new classes of objects are derived by absorbing characteristics of existing

classes, then adding unique characteristics of their own.

ANS:inheritance.

cpphtp10_01.fm Page 2 Monday, August 1, 2016 10:22 AM 2 / 4

Exercises3

  • is a graphical language that allows people who design software systems to use
  • an industry-standard notation to represent them.

ANS:The Unified Modeling Language (UML).

f) The size, shape, color and weight of an object are considered

of the object’s class.

ANS:attributes.

Exercises

1.4Fill in the blanks in each of the following statements:

a) The logical unit of the computer that receives information from outside the computer

for use by the computer is the .

ANS:input unit.

b) The process of instructing the computer to solve a problem is called .

ANS:computer programming.

  • is a type of computer language that uses English-like abbreviations for ma-
  • chine-language instructions.

ANS:Assembly language.

d) is a logical unit of the computer that sends information which has already been processed by the computer to various devices so that it may be used outside the computer.

ANS:The output unit.

e) and are logical units of the computer that retain information.

ANS:The memory unit, the secondary storage unit.

  • is a logical unit of the computer that performs calculations.

ANS:The arithmetic and logic unit (ALU).

  • is a logical unit of the computer that makes logical decisions.

ANS:The arithmetic and logic unit (ALU).

  • languages are most convenient to the programmer for writing programs
  • quickly and easily.

ANS:High-level.

i) The only language a computer can directly understand is that computer’s

.

ANS:machine language.

  • is a logical unit of the computer that coordinates the activities of all the other
  • logical units.

ANS:The central processing unit (CPU).

1.5Fill in the blanks in each of the following statements:

a) initially became widely known as the development language of the UNIX op- erating system.

ANS:C.

b) The

programming language was developed by Bjarne Stroustrup in the early 1980s at Bell Laboratories.

ANS:C++.

1.6Fill in the blanks in each of the following statements:

a) C++ programs normally go through six phases—

, , , , and .

ANS:edit, preprocess, compile, link, load, execute

b) A(n) provides many tools that support the software development process,

such as editors for writing and editing programs, debuggers for locating logic errors in programs, and many other features.

ANS:integrated development environment (IDE).

cpphtp10_01.fm Page 3 Monday, August 1, 2016 10:22 AM 3 / 4

  • Chapter 1 Introduction to Computers and C++
  • 1.7You’re probably wearing on your wrist one of the world’s most common types of objects— a watch. Discuss how each of the following terms and concepts applies to the notion of a watch: object, attributes, behaviors, class, inheritance (consider, for example, an alarm clock), modeling, messages, encapsulation, interface and information hiding.ANS:The entire watch is an object that is composed of many other objects (such as the moving parts, the band, the face, etc.) Watch attributes are time, color, band, style (digital or analog), etc. The behaviors of the watch include setting the time and get- ting the time. A watch can be considered a specific type of clock (as can an alarm clock). With that in mind, it is possible that a class called Clock could exist from which other classes such as watch and alarm clock could inherit the basic features in the clock. The watch is an abstraction of the mechanics needed to keep track of the time. The user of the watch does not need to know the mechanics of the watch in order to use it; the user only needs to know that the watch keeps the proper time. In this sense, the mechanics of the watch are encapsulated (hidden) inside the watch.The interface to the watch (its face and controls for setting the time) allows the user to set and get the time. The user is not allowed to directly touch the internal mechan- ics of the watch. All interaction with the internal mechanics is controlled by the in- terface to the watch. The data members stored in the watch are hidden inside the watch and the member functions (looking at the face to get the time and setting the time) provide the interface to the data.Making a Difference Throughout the book we’ve included Making a Difference exercises in which you’ll be asked to work on problems that really matter to individuals, communities, countries and the world.

    1.8(Test Drive: Carbon Footprint Calculator) Some scientists believe that carbon emissions, especially from the burning of fossil fuels, contribute significantly to global warming and that this can be combatted if individuals take steps to limit their use of carbon-based fuels. Various organi- zations and individuals are increasingly concerned about their “carbon footprints.” Websites such as TerraPass

http://www.terrapass.com/carbon-footprint-calculator-2/

and Carbon Footprint

http://www.carbonfootprint.com/calculator.aspx

provide carbon footprint calculators. Test drive these calculators to determine your carbon foot- print. Exercises in later chapters will ask you to program your own carbon footprint calculator. To prepare for this, research the formulas for calculating carbon footprints.

1.9(Test Drive: Body Mass Index Calculator) By recent estimates, two-thirds of the people in the United States are overweight and about half of those are obese. This causes significant increases in illnesses such as diabetes and heart disease. To determine whether a person is overweight or obese, you can use a measure called the body mass index (BMI). The United States Department of Health and Human Services provides a BMI calculator at

http://www.nhlbi.nih.gov/guidelines/

obesity/BMI/bmicalc.htm . Use it to calculate your own BMI. An exercise in Chapter 2 will ask you to program your own BMI calculator. To prepare for this, research the formulas for calculating BMI.

1.10(Attributes of Hybrid Vehicles) In this chapter you learned the basics of classes. Now you’ll begin “fleshing out” aspects of a class called “Hybrid Vehicle.” Hybrid vehicles are becoming increas- ingly popular, because they often get much better mileage than purely gasoline-powered vehicles.Browse the web and study the features of four or five of today’s popular hybrid cars, then list as many cpphtp10_01.fm Page 4 Monday, August 1, 2016 10:22 AM

  • / 4

User Reviews

Login to Review

No reviews yet. Be the first to share your thoughts!

Download Document

Buy This Document

$1.00 One-time purchase
Buy Now
  • Full access to this document
  • Download anytime
  • No expiration

Document Information

Category: Testbanks
Added: Dec 29, 2025
Description:

C++ How to Program, 10e Paul Deitel, Harvey Deitel (Solutions Manual All Chapter) (For Complete File Download link at the end of this File) 2 Chapter 1 Introduction to Computers and C++ Self-Review...

Unlock Now
$ 1.00