(Ebook) An Introduction to Programming with C++ by Diane Zak ISBN 9781285860114, 128586011X instant download
(Ebook) An Introduction to Programming with C++ by Diane Zak ISBN 9781285860114, 128586011X instant download
https://ebooknice.com/product/an-introduction-to-programming-
with-c-5291684
https://ebooknice.com/product/an-introduction-to-programming-
with-c-6th-edition-2427428
(Ebook) Programming with Microsoft Visual Basic 2012 by Diane Zak ISBN
9781285077925, 128507792X
https://ebooknice.com/product/programming-with-microsoft-visual-
basic-2012-6809572
(Ebook) Programming with Microsoft Visual Basic 2015 by Diane Zak ISBN
9781285860268, 1285860268
https://ebooknice.com/product/programming-with-microsoft-visual-
basic-2015-5312274
(Ebook) Programming with Microsoft Visual Basic 2017 by Diane Zak ISBN
9781337102124, 1337102121
https://ebooknice.com/product/programming-with-microsoft-visual-
basic-2017-6732858
(Ebook) Programming with Microsoft Visual Basic 2010, 5th Edition by
Diane Zak ISBN 1111529434
https://ebooknice.com/product/programming-with-microsoft-visual-
basic-2010-5th-edition-2357262
https://ebooknice.com/product/clearly-visual-basic-programming-with-
microsoft-visual-basic-2012-4644122
https://ebooknice.com/product/clearly-visual-basic-programming-with-
microsoft-visual-basic-2010-2382420
https://ebooknice.com/product/primary-mathematics-workbook-2b-23520620
https://ebooknice.com/product/primary-mathematics-textbook-2b-23519854
An Introduction to
Programming with C++
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Eighth Edition
An Introduction to
Programming with C++
Diane Zak
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
This is an electronic version of the print textbook. Due to electronic rights restrictions,
some third party content may be suppressed. Editorial review has deemed that any suppressed
content does not materially affect the overall learning experience. The publisher reserves the right
to remove content from this title at any time if subsequent rights restrictions require it. For
valuable information on pricing, previous editions, changes to current editions, and alternate
formats, please visit www.cengage.com/highered to search by ISBN#, author, title, or keyword for
materials in your areas of interest.
Important Notice: Media content referenced within the product description or the product
text may not be available in the eBook version.
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
An Introduction to Programming with C++, © 2016 Cengage Learning
Eighth Edition
WCN: 02-200-203
Diane Zak
Product Director: Kathleen McMahon ALL RIGHTS RESERVED. No part of this work covered by the copyright
herein may be reproduced, transmitted, stored or used in any form or by
Product Team Manager: Kristin McNary any means graphic, electronic, or mechanical, including but not limited to
Senior Product Manager: Jim Gish photocopying, recording, scanning, digitizing, taping, Web distribution,
Senior Content Developer: Alyssa Pratt information networks, or information storage and retrieval systems, except
as permitted under Section 107 or 108 of the 1976 United States Copyright
Product Assistant: Abigail Pufpaff
Act, without the prior written permission of the publisher.
Marketing Manager: Eric LaScola
Senior Production Director:
For product information and technology assistance, contact us at
Wendy Troeger Cengage Learning Customer & Sales Support, 1-800-354-9706
Production Director: Patty Stephan For permission to use material from this text or product, submit all
Senior Content Project Manager: requests online at www.cengage.com/permissions
Jennifer K. Feltri-George Further permissions questions can be emailed to
[email protected]
Managing Art Director: Jack Pendleton
Cover image(s):
Library of Congress Control Number: 2015940474
© Rudchenko Liliia/Shutterstock.com
ISBN: 978-1-285-86011-4
Unless otherwise noted all screenshots are
Cengage Learning
courtesy of Microsoft Corporation
20 Channel Center Street
Open Clip art source: OpenClipArt Boston, MA 02210
USA
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
v
Brief Contents
Pref ace . . . . . . . . . . . . . . . . . . . . . . . . . xi v
Read T h is B ef o re You Begi n . . . . . . . . . . . . . . . xv i i i
Chapt e r 1 A n I n t ro du ct io n to Programmi ng . . . . . . . . . . . . . . 1
Chapt e r 2 B eg in n in g t h e Probl em- Sol v i ng Process . . . . . . . . . . . 23
Chapt e r 3 Var iables an d Constants . . . . . . . . . . . . . . . . . 51
Chapt e r 4 Co m plet in g t h e Probl em- Sol v i ng Process . . . . . . . . . . 75
Chapt e r 5 T h e Select io n Structure . . . . . . . . . . . . . . . . . 113
Chapt e r 6 M o re o n t h e Selecti on Structure . . . . . . . . . . . . . 157
Chapt e r 7 T h e Repet it io n Structure . . . . . . . . . . . . . . . . 201
C HAPT E R 8 M o re o n t h e Repeti ti on Structure . . . . . . . . . . . . . 247
C HAPT E R 9 Valu e-Ret u r n in g Functi ons . . . . . . . . . . . . . . . . 279
C HAPT E R 10 Vo id F u n ct io n s . . . . . . . . . . . . . . . . . . . . . 329
C HAPT E R 11 On e-Dim en s io n a l Array s . . . . . . . . . . . . . . . . . 369
C HAPT E R 12 Tw o -Dim en s io n a l Array s . . . . . . . . . . . . . . . . . 425
C HAPT E R 13 St r in g s . . . . . . . . . . . . . . . . . . . . . . . . 461
C HAPT E R 14 Sequ en t ial A ccess Fi l es . . . . . . . . . . . . . . . . . 511
C HAPT E R 15 Clas s es an d Obj ects . . . . . . . . . . . . . . . . . . 551
A pp endix A C+ + Keyw o rds . . . . . . . . . . . . . . . . . . . . . 593
A pp endix B A SC II Co des . . . . . . . . . . . . . . . . . . . . . . 595
A pp endix C Co m m o n Syn t ax Errors . . . . . . . . . . . . . . . . . 597
A pp endix D Ho w To B o xes . . . . . . . . . . . . . . . . . . . . . 599
I n dex . . . . . . . . . . . . . . . . . . . . . . . . . 603
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
vi
Contents
Pref ace . . . . . . . . . . . . . . . . . . . . . . . . . xi v
R ead T h is B ef o re Yo u Begi n . . . . . . . . . . . . . . . xv i i i
Chapt e r 1 A n I n t ro du ct io n t o Programmi ng . . . . . . . . . . . . . . 1
Programming a Computer . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
The Programmer’s Job . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Employment Opportunities . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
A Brief History of Programming Languages . . . . . . . . . . . . . . . . . . . . 3
Machine Languages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Assembly Languages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
High-Level Languages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Control Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
The Sequence Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
The Selection Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
The Repetition Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
LAB 1-1 Stop and Analyze . . . . . . . . . . . . . . . . . . . . . . . . . . 10
LAB 1-2 Plan and Create . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
LAB 1-3 Modify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
LAB 1-4 What’s Missing? . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
vii
Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
viii
Contents
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
ix
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
x
Contents
Chapt er 10 Vo id F u n ct io n s . . . . . . . . . . . . . . . . . . . . . 329
Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
Creating Program-Defined Void Functions . . . . . . . . . . . . . . . . . . . . 331
Passing Variables to a Function . . . . . . . . . . . . . . . . . . . . . . . . 337
Reviewing Passing Variables by Value . . . . . . . . . . . . . . . . . . . . . 338
Passing Variables by Reference . . . . . . . . . . . . . . . . . . . . . . . 341
LAB 10-1 Stop and Analyze . . . . . . . . . . . . . . . . . . . . . . . . . 345
LAB 10-2 Plan and Create . . . . . . . . . . . . . . . . . . . . . . . . . . 347
LAB 10-3 Modify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
LAB 10-4 What’s Missing? . . . . . . . . . . . . . . . . . . . . . . . . . . 356
LAB 10-5 Desk-Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
LAB 10-6 Debug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xi
Chapter 13 St r in g s . . . . . . . . . . . . . . . . . . . . . . . . 461
The string Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
Getting String Input from the Keyboard . . . . . . . . . . . . . . . . . . . . . 462
The Primrose Auction House Program . . . . . . . . . . . . . . . . . . . . . 464
The ignore Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468
Determining the Number of Characters in a string Variable . . . . . . . . . . . 471
Accessing the Characters in a string Variable . . . . . . . . . . . . . . . . . 473
Searching the Contents of a string Variable . . . . . . . . . . . . . . . . . . 477
Removing Characters from a string Variable . . . . . . . . . . . . . . . . . . 481
Replacing Characters in a string Variable . . . . . . . . . . . . . . . . . . . 484
Inserting Characters Within a string Variable . . . . . . . . . . . . . . . . . 485
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xii
Contents
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xiii
In dex . . . . . . . . . . . . . . . . . . . . . . . . . 603
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xiv
Preface
An Introduction to Programming with C++, Eighth Edition uses the C++ programming language
to teach programming concepts. This book is designed for a beginning programming course.
Although the book provides instructions for using several specific C++ compilers (such as
® ®
Microsoft Visual C++ , Dev-C++, and Code::Blocks), it can be used with most C++ compilers,
often with little or no modification.
Approach
An Introduction to Programming with C++, Eighth Edition is distinguished from other textbooks
because of its unique approach, which motivates students by demonstrating why they need to
learn the concepts and skills presented. Each chapter begins with an introduction to one or more
programming concepts. The concepts are illustrated with code examples and sample programs.
The sample programs allow the student to observe how the current concept can be used before
they are introduced to the next concept. The concepts are taught using standard C++ commands.
Following the concept portion in each chapter (except Chapter 1) are six labs: Stop and Analyze,
Plan and Create, Modify, What’s Missing?, Desk-Check, and Debug. Each lab teaches students
how to apply the chapter concepts; however, each does so in a different way.
Features
An Introduction to Programming with C++, Eighth Edition is an exceptional textbook because it
also includes the following features:
READ THIS BEFORE YOU BEGIN This section is consistent with Cengage Learning’s
unequaled commitment to helping instructors introduce technology into the classroom.
Technical considerations and assumptions about hardware, software, and default settings are
listed in one place to help instructors save time and eliminate unnecessary aggravation.
LABS Each chapter (except Chapter 1) contains six labs that teach students how to
apply the concepts taught in the chapter to real-world problems. In the first lab,
which is the Stop and Analyze lab, students are expected to stop and analyze an
existing program. Students plan and create a program in the Plan and Create lab,
which is the second lab. The third lab is the Modify lab. This lab requires students to
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xv
Organization and Coverage
modify an existing program. In the fourth lab, which is the new What’s Missing? lab, students are
asked to find one or more missing instructions in a program. However, before they can
accomplish this task, they must put the existing instructions in the proper order. The fifth lab is
the Desk-Check lab, in which students follow the logic of a program by desk-checking it. The
sixth lab is the Debug lab. This lab gives students an opportunity to find and correct the errors in
an existing program. Answers to the labs are provided in the Answers.pdf file available at
CengageBrain.com. Providing the answers allows students to determine whether they have
mastered the material covered in the chapter.
HOW TO BOXES The How To boxes in each chapter summarize important concepts and
rovide a quick reference for students. The How To boxes that introduce new statements,
p
operators, stream manipulators, or functions contain the syntax and examples of using the syntax.
STANDARD C++ SYNTAX Like the previous edition of the book, this edition uses the standard
C++ syntax in the examples, sample programs, and exercises in each chapter.
PSEUDOCODE AND FLOWCHARTS Both planning tools are shown for many of the programs
within the chapters.
TIP These notes provide additional information about the current concept. Examples
include alternative ways of writing statements, warnings about common mistakes made
when using a particular command, and reminders of related concepts learned in previous
chapters.
MINI-QUIZZES Mini-Quizzes are strategically placed to test students’ knowledge at various
points in each chapter. Answers to the quiz questions are provided in the Answers.pdf file,
allowing students to determine whether they have mastered the material covered thus far before
continuing with the chapter.
WANT MORE INFO? FILES These notes direct students to files that accompany
each chapter in the book. The files contain additional examples and further
explanations of the concepts covered in the chapter. The files are in PDF format and
are available online at CengageBrain.com. Search for the ISBN associated with your
book (from the back cover of your book) using the search box at the top of the page.
This will take you to the product page where free companion resources can be found.
SUMMARY A Summary section follows the labs in each chapter. The Summary section recaps
the programming concepts and commands covered in the chapter.
KEY TERMS Following the Summary section in each chapter is a listing of the key terms
introduced throughout the chapter, along with their definitions.
REVIEW QUESTIONS Review Questions follow the Key Terms section in each chapter.
The Review Questions test the students’ understanding of what they learned in the chapter.
PAPER AND PENCIL EXERCISES The Review Questions are followed by Pencil
and Paper Exercises, which are designated as TRY THIS, MODIFY THIS,
INTRODUCTORY, INTERMEDIATE, ADVANCED, and SWAT THE BUGS. The
answers to the TRY THIS Exercises are provided at the end of the chapter. The
ADVANCED Exercises provide practice in applying cumulative programming k nowledge or
allow students to explore alternative solutions to programming tasks. The SWAT THE BUGS
Exercises provide an opportunity for students to detect and correct errors in one or more lines
of code.
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xvi
Contents Organization and Coverage
VIDEOS These notes direct students to videos that accompany each chapter in the
book. Many of the videos have been revised from the previous edition. The videos
explain and/or demonstrate one or more of the chapter’s concepts. The videos are
available online at CengageBrain.com. Search for the ISBN associated with your book (from the
back cover of your book) using the search box at the top of the page. This will take you to the
product page where free companion resources can be found.
INSTALLATION VIDEOS These videos, which have been revised from the previous
edition, show students how to install various C++ compilers (such as Microsoft Visual
C++, Dev-C++, and Code::Blocks). The videos are named Ch04-Installation
developmentTool, where developmentTool is the name of the C++ development tool covered in
the video. The videos are available online at CengageBrain.com. Search for the ISBN associated
with your book (from the back cover of your book) using the search box at the top of the page.
This will take you to the product page where free companion resources can be found.
STEP-BY-STEP INSTRUCTIONS This book is accompanied by files that contain step-by-step
instructions for completing Labs 4-2, 4-3, 4-4, 4-6, 5-2, 5-3, and 5-6 using various
C++ compilers. The files, which have been revised from the previous edition, are named
Ch04-Lab4-X developmentTool.pdf and Ch05-Lab5-X developmentTool.pdf, where X represents
the lab number, and developmentTool is the name of the C++ development tool covered in the
file. The files are in PDF format and are available online at www.cengagebrain.com. Search for
the ISBN associated with your book (from the back cover of your book) using the search box at
the top of the page. This will take you to the product page where free companion resources can
be found.
APPENDICES Appendices B, C, D, and E are now Appendices A, B, C, and D. The information
in Appendix A from the previous edition is now contained in the Answers.pdf file.
POW FUNCTION The pow function is now covered along with the built-in value-returning
functions in Chapter 9 (rather than in Chapter 8).
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xvii
Acknowledgments
Instructor Resources
The following resources are available on the Instructor Companion Site (sso.cengage.com) to
instructors who have adopted this book. Search for this title by ISBN, title, author, or keyword.
From the Product Overview page, select the Instructor’s Companion Site link to access your
complementary resources.
INSTRUCTOR’S MANUAL The Instructor’s Manual follows the text chapter by chapter to assist
you in planning and organizing an effective, engaging course. The manual includes learning
objectives, chapter overviews, ideas for classroom activities, and additional resources. A sample
course Syllabus is also available.
TEST BANK Cengage Learning Testing Powered by Cognero is a flexible, online system that
allows you to:
•• author, edit, and manage test bank content from multiple Cengage Learning solutions
•• create multiple test versions in an instant
•• deliver tests from your LMS, your classroom or wherever you want
POWERPOINT PRESENTATIONS This book comes with Microsoft PowerPoint slides for
each chapter. These are included as a teaching aid for classroom presentation, to make available
to students on the network for chapter review, or to be printed for classroom distribution.
Instructors are encouraged to customize the slides to fit their course needs, and may add slides
to cover additional topics using the complete Figure Files from the text, also available on the
Instructor Companion Site.
SOLUTION FILES Solutions to the Labs, Review Questions, Pencil and Paper Exercises, and
Computer Exercises are available. The Solution Files also contain the sample programs that
appear in the figures throughout the book.
DATA FILES Data Files are required to complete many Labs and Computer Exercises in this
book. They are available on the Instructor Companion Site as well as on CengageBrain.com.
Acknowledgments
Writing a book is a team effort rather than an individual one. I would like to take this
opportunity to thank my team, especially Alyssa Pratt (Senior Content Developer), Jennifer
K. Feltri-George (Senior Content Project Manager), Marisa Taylor (Senior Project Manager),
and Nicole Ashton, Serge Palladino, Chris Scriver (Quality Assurance). Thank you for your
support, enthusiasm, patience, and hard work; it made a difficult task much easier. Last, but
certainly not least, I want to thank Fred D’Angelo, Pima Community College East Campus;
Charles Nelson, Rock Valley College; and Mark Shellman, Gaston College for their invaluable
ideas and comments.
Diane Zak
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xviii
Technical Information
Data Files
You will need data files to complete the Labs and Computer Exercises in this book. Your
instructor may provide the data files to you. You may obtain the files electronically at
CengageBrain.com. Search for the ISBN associated with your book (from the back cover of your
text) using the search box at the top of the page. This will take you to the product page where
free companion resources can be found.
Each chapter in this book has its own set of data files, which are stored in a separate folder
within the Cpp8 folder. The files for Chapter 4 are stored in the Cpp8\Chap04 folder. Similarly,
the files for Chapter 5 are stored in the Cpp8\Chap05 folder. Throughout this book, you will be
instructed to open files from or save files to these folders.
You can use a computer in your school lab or your own computer to complete the Labs and
Computer Exercises in this book.
Copyright 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Exploring the Variety of Random
Documents with Different Content
liikkeelle ja vihanta metsä alkanut ikuisen huminansa, joka tällä
kertaa kuului kuin mieltä ylentävä hautausvirsi. Oli kuin muukin
luonto olisi viehtynyt näistä muistoista. Kovettunut kivi tuntui
heltyvän ja vuodattavan kyyneleitä, vihanta kaisla ääneensä itkevän
ja rannan aalto valituksillaan yhtyvän yleiseen kaihoon.
Kaksi onnellista.
— Tee sinä se, armas Ernesto! Minä istun niin kauvan täällä, sanoi
rouva sulavasti.
— Ei, ei! Minä odotan täällä niin kauvan. Meillä — hän pani
huomattavan painon meillä sanalle — on vielä paljo juteltavaa,
muisteltavaa.
— Mitä kello on? kysäsi hän äkkiä. Hyvä Jumala, puoli kymmenen,
eikä mieheni ole vielä tullut! kuului rouvan suusta.
Nyt tuli rouvalle kiire. Oitis oli kepsi paikoillaan ja hattu päässä.
Riensimme sitä kyytiä kadulle. Häthätää heitti hän minulle hyvästit,
otti ajurin ja hävisi kohta illan hämärään…
Hyvä herra!
Kaksi onnellista.
Hänen puheensa.
Juhlapäivä valkeni, kirkas ja tyyni. Virtten hyminään heräsi isäntä.
Vuosi sitten oli tehtaalle tullut uusi työnjohtaja, kun entinen oli
matkustanut Tuonen mustaan maahan. Työnjohtajaksiko vai miksi,
sitä eivät jääneet udelleet. Niin oli mennyt hänkin, tuo vanha
rakastettu johtaja, kaiken maailman tietä, ja tuskin muisto oli
miehestä enää jälellä, ja uusi tuntematon tullut sijaan.
Yhtä miellyttävä oli mies sisällisesti kuin ulkonaisesti outo. Hän oli
iloinen ja leikkisä, luonnollinen ja hilpeä, kohtelias ja ystävällinen
kaikille. Jokaiselle oli hänellä aina ja joka tilassa sopiva, miellyttävä
sana annettavana, tapasipa hänet milloin ja missä hyvänsä. Hän oli
aina tyytyväinen, itse tyytyväisyys: yhtä tyytyväinen illoilla kuin
aamuisin, yhtä tyytyväinen syömään ruvetessaan kuin syötyäänkin.
Ei kukaan ollut vuoden kuluessa nähnyt hänen kiihtyvän, vielä
vähemmin suuttuvan tahi kiivastuvan. Ja työt kävivät tehtaalla
paremmin entistään, vaikka työnjohtaja ei pitänyt suurta ääntä, ei
kiroillut eikä kiljunut. Hänen tullessaan tehtaalle kammoksuivat
häntä kaikki, muutaman viikon päästä ei kukaan, päinvastoin sukelsi
hän kaikkien suosioon. Kaikki hänestä pitivät, niin miehet kuin
naiset, niin aikaiset kuin lapset, niin vanhat kuin nuoret.
— Ei, hyvät miehet, ei se sovi. Minä olen nuorin mies täällä, joka
en tunne oloja vielä enkä mitään. Puhe on vanhimman pidettävä,
sen, joka enimmän aikaa on tehtaalla ollut. Kyllä minä saatan auttaa
puhetta valmistettaessa ja ohjata lausumisessa, mutta kunnioitetun
isäntämme arvo vaatii, että tehtaan vanhin työmies tunteemme
tulkitsee…
— Eläköön!
Voimakkaasti oli puhunut vanha mies. Valtava kuin ukkosen jyrinä
vyöryi eläköön-huuto kautta juhlakentän: kautta tehtaan
rakennusten, kunnes se vähitellen vaipui mustan metsän hiljaiseen
poveen.
— "Niin, niin… Kun hän sen tekee, niin häntä ei tuomita", sanoi
patrooni viimmein ja laskeusi pastorin turvaamana puhelavalta. —
Perheensä ja omaistensa saattamana kulki hän sitten sanaakaan
lausumatta asuntoonsa.
Näin keskeytyi juhla ja kansa hajosi hiljaisesti kentältä,
kummeksien, että mikähän äkillinen kouristus mahtoi isäntää
kohdata.
— Mikä mahtoi patroonille tulla? kysyi vanhus, joka oli puheen
pitänyt.
— Kuinka niin?
Näin tuli uusi emäntä Vanhaan pihaan, johon kuului puolet entisen
suuren tilan laajoista maista.
Ajan oloon tuli hänestä tehtaan osakas, patroonin oikea käsi, veli
ja ystävä.
He ovat nyt jo aikoja päiviä hekin olleet sen tuomarin edessä, joka
kultavaa'alla punnitsee, missä mielessä olet työsi tehnyt ja
kutsumuksesi täyttänyt.
Enkeli ja piru.
Mies kulki katua, työmies, ja vaikeroi:
— Vaanpa ajattelet…
— En pahaa.
— Mikä ei kannata?
— Elää säännöllisesti…
— Sama se.
— Terve! Enhän minä sitä, ettei olla saisi, vaan että vähemmälläkin
toimeen tultaisiin. Jos kapakoita olisi vähemmin, niin harvemmin
niihin heikot sielut horjahtelisivat, koetti Antti puolustautua.
Tuotiinhan sitä.
— Sitä minäkin.
Antti heltyi itkuun, ett'ei voinut mitään sanoa. Hän puristi rajusti
naisen kättä, jonka tämä erotessaan ojensi.
"Kavala, kauhia"…
Kun hän astui ulos laitoksesta, tuli häntä vastaan nuori ylioppilas.
Miehet tekivät "kupit", ja kun kerta yhdet oli tehty, niin tottahan
sitä piti toiselle jalallekin ottaa… Tottahan tuota sisarenpoika saapi
enolleen kaksikin lasia tarjota. Eihän se ole missään kielletty… ei
sanassa eikä laissa eikä missään. Ja kun ne on kaikki, niin "ei kaksi
kolmannetta." Kun sitten sisarenpoika on enolleen tarjonnut, niin
kyllä kait enokin saapi sisarenpoikaansa vieraana pitää, olletikin kun
sattuu varoja olemaan. Eihän sitä siltä juoppo ole, eikä jatkaa
tarvitse. Ja kyllähän kotonakin toimeen tulevat. Onhan siellä
ruokaa… ruokaa jos muutakin.
— Puolivälissä kuusi!
— Tiedätkö mitä?
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebooknice.com