(Ebook) An Introduction to Programming with C++, 6th Edition by Diane Zak ISBN 9780538466523, 0538466529 pdf download
(Ebook) An Introduction to Programming with C++, 6th Edition by Diane Zak ISBN 9780538466523, 0538466529 pdf download
https://ebooknice.com/product/an-introduction-to-programming-
with-c-6th-edition-2427428
https://ebooknice.com/product/an-introduction-to-programming-with-c-5291684
https://ebooknice.com/product/biota-grow-2c-gather-2c-cook-6661374
https://ebooknice.com/product/programming-with-microsoft-visual-
basic-2010-5th-edition-2357262
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
https://ebooknice.com/product/programming-with-microsoft-visual-
basic-2017-6732858
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
AN INTRODUCTION TO
PROGRAMMING WITH C++
This page intentionally left blank
SIXTH EDITION
AN INTRODUCTION TO
PROGRAMMING WITH C++
DIANE ZAK
Australia • Brazil • Japan • Korea • Mexico • Singapore • Spain • United Kingdom • United States
An Introduction to Programming with C++, © 2011 Course Technology, Cengage Learning
Sixth Edition
ALL RIGHTS RESERVED. No part of this work covered by the copyright herein
Diane Zak may be reproduced, transmitted, stored or used in any form or by any means—
Executive Editor: Marie Lee graphic, electronic, or mechanical, including but not limited to photocopying,
recording, scanning, digitizing, taping, Web distribution, information networks,
Acquisitions Editor: Amy Jollymore
or information storage and retrieval systems, except as permitted under
Freelance Product Manager: Tricia Coia Section 107 or 108 of the 1976 United States Copyright Act—without the prior
Senior Content Project Manager: Jill Braiewa written permission of the publisher.
Editorial Assistant: Zina Kresin
For product information and technology assistance, contact us at
Art Director: Marissa Falco
Cengage Learning Customer & Sales Support, 1-800-354-9706
Text Designer: Shawn Girsberger For permission to use material from this text or product,
Print Buyer: Julio Esperas submit all requests online at cengage.com/permissions
Further permissions questions can be emailed to
Proofreader: Andy Smith, Green Pen QA
[email protected]
Indexer: Michael Brackney
Compositor: Integra Software Services
Library of Congress Control Number: 2009941969
ISBN-13: 978-0-538-46652-3
ISBN-10: 0-538-46652-9
Course Technology
20 Channel Center Street
Boston, MA 02210
USA
Some of the product names and company names used in this book have been
used for identification purposes only and may be trademarks or registered
trademarks of their respective manufacturers and sellers.
Course Technology, a part of Cengage Learning, reserves the right to revise this
publication and make changes from time to time in its content without notice.
Purchase any of our products at your local college store or at our preferred
online store: www.CengageBrain.com
P ref ac e . . . . . . . . . . . . . . . . . . . . . . xiv
CH AP T ER 1 An I n t rod u c t i on to P ro g r a mmi n g . . . . . . . . . . . . 1
CH AP T ER 2 B eg i n n i n g t h e P ro b l e m- S o l v i n g P ro ce s s . . . . . . . . 22
CH AP T ER 3 Vari abl es an d C o n s ta n ts . . . . . . . . . . . . . . 51
CH AP T ER 4 C om p l et i n g t h e P ro b l e m- S o l vi n g P ro ce s s . . . . . . . 77
CH AP T ER 7 Th e R ep et i t i on S tr u ctu re . . . . . . . . . . . . . . 213
CH AP T ER 10 Voi d Fu n c t i on s . . . . . . . . . . . . . . . . . . 370
CH AP T ER 11 O n e-D i m en si on a l A r r a y s . . . . . . . . . . . . . . 419
CH AP T ER 12 Tw o-D i m en si on a l A r r a y s . . . . . . . . . . . . . . 486
CH AP T ER 13 St ri n g s . . . . . . . . . . . . . . . . . . . . . . 524
CH AP T ER 14 Seq u en t i al Ac c e s s F i l e s . . . . . . . . . . . . . . 582
AP P EN D IX A A n sw ers t o M i n i - Q u i z z e s a n d L a b s . . . . . . . . . . 626
AP P EN D IX D H ow t o U se M i c ro s o ft V i s u a l C + + . . . . . . . . . . 693
AP P EN D IX E H ow t o U se D ev- C + + . . . . . . . . . . . . . . . . 694
vii
AP P EN D IX F C l asses an d O b j e cts . . . . . . . . . . . . . . . . 695
I n d ex . . . . . . . . . . . . . . . . . . . . . . 721
Contents
viii
P ref ac e . . . . . . . . . . . . . . . . . . . . . . xiv
CH AP T ER 1 A n I n t rod u c t i on to P ro gr a mmi n g . . . . . . . . . . . . 1
Programming a Computer . . . . . . . . . . . . . . . . . . . . . . . 2
The Programmer’s Job . . . . . . . . . . . . . . . . . . . . . . . 2
Do I Have What It Takes to Be a Programmer? . . . . . . . . . . . . . 2
Employment Opportunities . . . . . . . . . . . . . . . . . . . . . 3
A Brief History of Programming Languages . . . . . . . . . . . . . . . . 4
Machine Languages . . . . . . . . . . . . . . . . . . . . . . . . 4
Assembly Languages . . . . . . . . . . . . . . . . . . . . . . . . 4
High-Level Languages. . . . . . . . . . . . . . . . . . . . . . . . 4
Control Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
The Sequence Structure . . . . . . . . . . . . . . . . . . . . . . 6
The Selection Structure . . . . . . . . . . . . . . . . . . . . . . . 7
The Repetition Structure . . . . . . . . . . . . . . . . . . . . . . 9
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
CH AP T ER 2 B eg i n n i n g t h e P ro b l e m- S o l v i n g P ro ce s s . . . . . . . . 22
Problem Solving . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Solving Everyday Problems . . . . . . . . . . . . . . . . . . . . . . . 23
Creating Computer Solutions to Problems . . . . . . . . . . . . . . . . 24
Step 1—Analyze the Problem . . . . . . . . . . . . . . . . . . . . . . 25
Step 2—Plan the Algorithm . . . . . . . . . . . . . . . . . . . . . . . 27
Step 3—Desk-Check the Algorithm . . . . . . . . . . . . . . . . . . . 31
The Gas Mileage Problem . . . . . . . . . . . . . . . . . . . . . . . . 34
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
CH AP T ER 3 Vari abl es an d Co n s ta n ts . . . . . . . . . . . . . . 51
Beginning Step 4 in the Problem-Solving Process . . . . . . . . . . . . . 52
Internal Memory . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Selecting a Name for a Memory Location . . . . . . . . . . . . . . . . 53
Revisiting the Treyson Mobley Problem . . . . . . . . . . . . . . . . 54
Selecting a Data Type for a Memory Location . . . . . . . . . . . . . . 55
How Data Is Stored in Internal Memory . . . . . . . . . . . . . . . . 57
Selecting an Initial Value for a Memory Location . . . . . . . . . . . . . 60
Declaring a Memory Location . . . . . . . . . . . . . . . . . . . . . . 62
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 ix
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
CH AP T ER 4 C om p l et i n g t h e P ro b l e m- S o l v i n g P ro ce s s . . . . . . . . 77
Finishing Step 4 in the Problem-Solving Process . . . . . . . . . . . . . 78
Getting Data from the Keyboard . . . . . . . . . . . . . . . . . . . . . 79
Displaying Messages on the Computer Screen . . . . . . . . . . . . . . 81
Arithmetic Operators in C++ . . . . . . . . . . . . . . . . . . . . . . 83
Type Conversions in Arithmetic Expressions . . . . . . . . . . . . . 84
The static_cast Operator . . . . . . . . . . . . . . . . . . . . 86
Assignment Statements . . . . . . . . . . . . . . . . . . . . . . . . 87
Step 5—Desk-Check the Program . . . . . . . . . . . . . . . . . . . . 90
Step 6—Evaluate and Modify the Program . . . . . . . . . . . . . . . . 92
Arithmetic Assignment Operators . . . . . . . . . . . . . . . . . . . . 97
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
CH AP T ER 7 Th e R ep et i t i on S tr u ctu re . . . . . . . . . . . . . . 213
Repeating Program Instructions . . . . . . . . . . . . . . . . . . . . . 214
Using a Pretest Loop to Solve a Real-World Problem . . . . . . . . . . . 216
Flowcharting a Pretest Loop . . . . . . . . . . . . . . . . . . . . . . 219
The while Statement . . . . . . . . . . . . . . . . . . . . . . . . . 221
Using Counters and Accumulators . . . . . . . . . . . . . . . . . . . . 224
The Sales Express Program . . . . . . . . . . . . . . . . . . . . . 225
Counter-Controlled Pretest Loops . . . . . . . . . . . . . . . . . . . . 228
The for Statement . . . . . . . . . . . . . . . . . . . . . . . . . . 231
The Holmes Supply Program. . . . . . . . . . . . . . . . . . . . . 233
The Colfax Sales Program . . . . . . . . . . . . . . . . . . . . . . 236
Another Version of the Miller Incorporated Program . . . . . . . . . . 238
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
CH AP T ER 10 Voi d Fu n c t i on s . . . . . . . . . . . . . . . . . . 370
Void Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
Passing Variables to a Function . . . . . . . . . . . . . . . . . . . . . 376
Reviewing Passing Variables by Value . . . . . . . . . . . . . . . . 377
Passing Variables by Reference . . . . . . . . . . . . . . . . . . . 379
The Salary Program . . . . . . . . . . . . . . . . . . . . . . . . . . 384
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406
CH AP T ER 11 O n e-D i m en si on a l A r r a y s . . . . . . . . . . . . . . 419
Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420
One-Dimensional Arrays . . . . . . . . . . . . . . . . . . . . . . . . 420
Declaring and Initializing a One-Dimensional Array . . . . . . . . . . . 422
Entering Data into a One-Dimensional Array . . . . . . . . . . . . . . 424
Displaying the Contents of a One-Dimensional Array . . . . . . . . . . 426
Coding the XYZ Company’s Sales Program . . . . . . . . . . . . . . 427
Passing a One-Dimensional Array to a Function . . . . . . . . . . . . . . 433
The Moonbucks Coffee Program—Calculating a Total and Average . . . . . 436
The KL Motors Program—Searching an Array . . . . . . . . . . . . . . . 439
The Hourly Rate Program—Accessing an Individual Element . . . . . . . . 442
The Random Numbers Program . . . . . . . . . . . . . . . . . . . . . 444
Sorting the Data Stored in a One-Dimensional Array . . . . . . . . . . . . 454
Parallel One-Dimensional Arrays . . . . . . . . . . . . . . . . . . . . . 461
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . 474
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478
CH AP T ER 12 Tw o-D i m en si on a l A r r a y s . . . . . . . . . . . . . . 486
Using Two-Dimensional Arrays . . . . . . . . . . . . . . . . . . . . . . 487
Declaring and Initializing a Two-Dimensional Array . . . . . . . . . . . 489
Entering Data into a Two-Dimensional Array . . . . . . . . . . . . . . 491
CONTENTS
CH AP T ER 13 St ri n g s . . . . . . . . . . . . . . . . . . . . . . 524
The string Data Type. . . . . . . . . . . . . . . . . . . . . . . . . 525
The Creative Sales Program . . . . . . . . . . . . . . . . . . . . . . 526
The getline Function . . . . . . . . . . . . . . . . . . . . . . . 527
The ignore Function . . . . . . . . . . . . . . . . . . . . . . . 531
The ZIP Code Program . . . . . . . . . . . . . . . . . . . . . . . . . 535
Determining the Number of Characters Contained in
a string Variable . . . . . . . . . . . . . . . . . . . . . . . . . 535
Accessing the Characters Contained in a string Variable . . . . . . . 538
The Rearranged Name Program . . . . . . . . . . . . . . . . . . . . . 544
Searching the Contents of a string Variable. . . . . . . . . . . . . 544
The Annual Income Program . . . . . . . . . . . . . . . . . . . . . . 547
Removing Characters from a string Variable . . . . . . . . . . . . 548
Replacing Characters in a string Variable. . . . . . . . . . . . . . 551
The Social Security Number Program . . . . . . . . . . . . . . . . . . 553
Inserting Characters Within a string Variable . . . . . . . . . . . . 554
The Company Name Program . . . . . . . . . . . . . . . . . . . . . . 556
Duplicating a Character Within a string Variable . . . . . . . . . . . 557
Concatenating Strings . . . . . . . . . . . . . . . . . . . . . . . 558
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . 570
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574
CH AP T ER 14 Seq u en t i al Ac c e s s F i l e s . . . . . . . . . . . . . . 582
File Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583
The CD Collection Program . . . . . . . . . . . . . . . . . . . . . . . 583
Creating File Objects . . . . . . . . . . . . . . . . . . . . . . . . . . 585
Opening a Sequential Access File . . . . . . . . . . . . . . . . . . . . 586
Determining Whether a File Was Opened Successfully . . . . . . . . . 589
Writing Data to a Sequential Access File . . . . . . . . . . . . . . . . . 590
Reading Information from a Sequential Access File . . . . . . . . . . . . 592
Testing for the End of a Sequential Access File . . . . . . . . . . . . . . 594
Closing a Sequential Access File . . . . . . . . . . . . . . . . . . . . 595
Coding the CD Collection Program. . . . . . . . . . . . . . . . . . . . 596
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . 615
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618
AP P EN D IX A A n sw ers t o M i n i - Q u i z z e s a n d L a b s . . . . . . . . . . 626
AP P EN D IX C ASC I I C od es . . . . . . . . . . . . . . . . . . . 691
xiii
AP P EN D IX D H ow t o U se M i c ro s o ft V i s u a l C + + . . . . . . . . . . 693
AP P EN D IX E H ow t o U se D ev- C + + . . . . . . . . . . . . . . . . 694
I n d ex . . . . . . . . . . . . . . . . . . . . . . 721
Preface
xiv
An Introduction to Programming with C++, Sixth Edition uses the C++ pro-
gramming language to teach programming concepts. This book is designed for
a beginning programming course. Although the book provides instructions for
using the Microsoft® Visual C++® and Dev-C++ compilers, it can be used with
most C++ compilers, often with little or no modification.
Approach
An Introduction to Programming with C++, Sixth 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 five labs: Stop and Analyze, Plan and Create, Modify,
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++, Sixth Edition is an exceptional text-
book because it also includes the following features:
READ THIS BEFORE YOU BEGIN This section is consistent with Course
Technology’s unequaled commitment to helping instructors introduce
Organization and Coverage
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 Tricia Coia (Freelance
Product Manager), Jill Braiewa (Senior Content Project Manager), Sreejith
Govindan (Full Service Project Manager), and Nicole Ashton (Quality Assur-
xviii ance). 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
Matthew Alimagham (Spartanburg Technical College) and Linda Cohen
(Forsyth Technical Community College) for their invaluable ideas and com-
ments. And an extra special thank you to Bill Tucker (Austin Community
College) for going way above and beyond to help me on this project. Your
attention to detail and your willingness to share your ideas and your experi-
ences with the previous edition of the book were very much appreciated.
Diane Zak
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 on the Course Technology Web site (www.cengage.com/
coursetechnology).
Each chapter in this book has its own set of data files, which are stored in a
separate folder within the Cpp6 folder. The files for Chapter 4 are stored in
the Cpp6\Chap04 folder. Similarly, the files for Chapter 5 are stored in the
Cpp6\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 com-
plete the Labs and Computer Exercises in this book.
It is Alcestis’ very self, won back from death as Apollo had promised;
but with the awful silence of the tomb still upon her. Heracles places
her hand in that of the reluctant and incredulous king, while he
draws aside her veil:
“Yea, guard her. Thou shalt call
The child of Zeus one day a noble guest.
Look on her, if in aught she seems to thee
Like to thy wife. Step forth from grief to bliss.“[29]
She pours out her heart to the listeners; and it is not a mere selfish
recital of her own sorrow. The brain that had been clear and quick to
save her lover in the extremity of danger has not lost its power. She
sees the base act of Jason in its broad aspect, as a wrong to
womankind; and she rises from the contemplation of her personal
suffering to the thought that this, after all, is but one of the many
evils that subjection brings upon women. But the greatest evil—the
helpless creature goaded to crime by injustice—is present to her at
this moment only as a blind craving for revenge. It will seize and
carry her on to its culmination as the sweetest thing that life now
holds; but it will finally reveal itself, since she cannot but face the
truth, as the last and deepest wrong, that has cancelled her
humanity. The light of that thought has not yet dawned; and will not
until the storm of passion has wrought sheer havoc. All her fervent
nature is possessed by the idea of vengeance; and seeing that her
friends pity and sympathize, she pledges them not to betray her.
Their willing promise is only just in time, for they are interrupted by
the arrival of the king, guarded by armed attendants whose very
presence is a menace. Creon is old, and has grown hard and
tyrannous with age. He has long desired a great match for his only
daughter, hoping to see his line established on the throne of Corinth
before his death. To him the marriage with the Argonaut hero is not
only a prudent step, likely to bring him reflected glory; but a thing
perfectly right in itself, because perfectly legal. By the letter of the
law, which forbade a Greek to marry a ‘barbarian,’ Medea was not
Jason’s wife; and the letter of the law merely was of concern to
Creon. To him Medea was an uncivilized creature from outland parts:
a being without rights, who might safely be ignored; and having won
over Jason, the match was arranged and the preliminary formalities
concluded. Not until a rumour reached him that Medea in her wrath
had solemnly cursed his child and him, did any thought of her
disturb him. Then, fearing that she might indeed do his daughter
some injury, or at the least might move public opinion in her favour,
he determined upon instant banishment for her and her two young
sons. Without a word to soften or explain his action, he stands
before Medea now, and curtly orders her to prepare for departure.
The blow is so crushing that for a moment Medea seems to sink
under it; she can think of nothing but to ask what crime of hers has
merited this punishment. But when Creon cynically replies that there
has been no crime, and that the measure is one of precaution
merely, to guard himself against her reputation for magic-lore, she
rallies her wit and meets him on his own ground. Half ironically, she
repudiates the damning possession of brains, and bids him set his
mind at rest.
“’Tis not the first nor second time, O King,
That fame hath hurt me....
Come unto fools with knowledge of new things,
They deem it vanity, not knowledge....
Ah, I am not so wondrous wise!—And now,
To thee, I am terrible! What fearest thou?
What dire deed? Do I tread so proud a path—
Fear me not thou!—that I should brave the wrath
Of princes?“[31]
Creon sees that she is trying to placate him, and harshly repeats his
decree. He even threatens her, when she continues her entreaties,
with force from his soldiery; and Medea, shrinking in horror from the
thought of personal violence, instantly ceases her petition. She
pretends to yield; and in feigned humility, begs on her knees for one
day’s respite. Creon, partly deceived, and entirely convinced that she
can do no harm in so short a time, reluctantly consents. But he has
hardly gone when Medea breaks into a torrent of speech which, in
its fierce exultation over Creon, its wild leap to the height of daring
and its rallying cry to her own spirit, comes very near to madness.
All the shapeless thoughts of vengeance on which she had brooded
spring into vivid life as she rapidly cons now this plot, now that, to
reach her end. Of the end itself there can be no doubt; she must kill
these three—the king, and Jason and his bride—in the few hours left
to her. And for this she will need every resource of strategy and
courage.
“Awake thee now, Medea! Whatso plot
Thou hast, or cunning, strive and falter not.
On to the peril-point! Now comes the strain
Of daring. Shall they trample thee again?“[31]
No wonder that the Chorus sing, as she rushes into the house, of a
strange reversal of all the order of nature; of woman made terrible
because man has forgotten God. They take up the story of Medea’s
broken life: of the wonder and the pity of it: of her distant home: of
her surpassing love for Jason, and of her betrayal. In the beauty and
grace of the songs the emotional strain is lightened: but they have a
further purpose. For while they tell the old story over in tender
phrases, Jason himself enters and Medea again comes out of the
house. The two stand face to face at last and the crux of the drama
is reached. Jason is the first to speak; and one feels all the spirit of
the man in his opening words—cold, ambitious, prudent, with ideals
faded and every generous emotion dead. He protests that he has
acted from motives of policy and considerations of their best
interest: for the welfare of Medea and their children as well as for
himself. The new marriage was the only way, in a land to which they
were strangers, to secure a home for them all, and princely
connexions for his sons. But Medea has spoiled everything by her
ungovernable anger: and he has come, since nothing else is possible
now, to make provision for the children in their exile.
The speech is clear, terse, moderate in tone, and pitilessly logical
from Jason’s point of view. From that point, too, it is not unkind: he
wishes to do what may be done to soften their lot. But to the
woman who loves him his words are a mere blur of sound, the logic
meaningless, the untroubled manner a thing of contempt. In tone
and look and gesture one fact is certain—that her husband has
ceased to love her, and is content to cast her off. It has clamoured in
her ears while he spoke, drowning every other sound; and when she
replies it is that which prompts her. It inspires her great indictment—
the case for the woman against injustice throughout all time—and it
evokes a shuddering recoil from baseness which she feels to be
literally a pollution.
“Evil—most Evil ...
I will begin with that, ‘twixt me and thee,
That first befell. I saved thee. I saved thee—
... And hast thou then
Accepted all—O evil yet again!—
And cast me off and taken for thy bride
Another? And with children at thy side!
... Is sworn faith so low
And weak a thing? I understand it not.
Are the old gods dead? Are the old laws forgot,
And new laws made? ...
... O great God, shall gold withal
Bear thy clear mark, to sift the base and fine,
And o’er man’s living visage runs no sign
To show the lie within, ere all too late?“[31]
Herbert Draper
Quickly she lays her plan. She will recall Jason, feign repentance,
and send the children to the bride with gifts—marvellous raiment
and jewels which will hide under their beauty an agonizing death for
Glaucé. But that done—she pauses in horror, the sweetness of
revenge dashed by the thought of what must follow. Then, she must
lift her hand to slay her children, before they can be caught and
killed for their mother’s crime. There is a short altercation with the
friendly women about her, who make a futile effort to restrain her.
But brushing aside their remonstrance, she sends the nurse for
Jason, and in a scene which vibrates with dramatic power, she
pretends to make peace with him, and puts the frightful revenge in
motion. Jason, completely deceived, promises that the children shall
be taken to Glaucé, to present their gifts and beg for leave to stay in
Corinth. But twice, as the little ones stand waiting, the motherhood
in Medea rebels against the fury that is driving her. Tears that she
cannot check rush into her eyes, and she almost forgets her rôle, as
she clasps them to her.
“Shall it be
A long time more, my children, that ye live
To reach to me those dear, dear arms? ... Forgive.“[31]
But even yet she cannot strike: one thing more is needed to nerve
her hand, and it comes only too soon. A messenger is seen flying
toward them from the palace in frantic haste. As he comes within
hail, he shouts to Medea to flee—both Creon and the princess lie
dead from the effects of her poisoned gift, and she has not a
moment to lose. Her own life will surely be demanded for the crime.
Medea remains immovable, smiling in awful joy at the news. She
makes the man relate every detail of the ghastly scene in the palace;
and for just so long as the story takes to tell, she clasps revenge
complete and satisfying. But a moment later the thing has shrivelled
in her hand; for there is now no hope to save her children.
“Oh, up, and get thine armour on,
My heart!...
Take up thy sword, O poor right hand of mine,
Thy sword: then onward to the thin-drawn line
Where life turns agony.”[31]
She goes into the house; and a moment later the shrieks of the
children are heard. They have hardly ceased when Jason rushes in,
bent on carrying off his sons before the king’s avengers can capture
them. A woman warns him of what is passing within; and as the
agonized father bursts open the door of the house, Medea appears
on the roof, in the dragon-chariot of the Sun, with the poor dead
bodies lying at her feet. There is something weird in this touch of
the supernatural; but there is something symbolic too. For Medea is
a woman no longer: with her own hand, driven by foul wrong and
an untamed heart, she has cast humanity away.
We need not follow to the end the last clash of the two bitter spirits.
Jason pleads piteously for one poor boon: “Give me the dead to
weep and make their grave.” But the fury that has smitten him is
inexorable.
“Never! Myself will lay them in a still
Green sepulchre....
... For thee, behold, death draweth on,
Evil and lonely, like thine heart: the hands
Of thine own Argo, rotting where she stands,
Shall smite thine head in twain, and bitter be
To the last end thy memories of me.“[31]
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