Download as pdf or txt
Download as pdf or txt
You are on page 1of 41

Invitation to Computer Science 8th

Edition (eBook PDF)


Visit to download the full and correct content document:
https://ebooksecure.com/download/invitation-to-computer-science-8th-edition-ebook-
pdf/
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
vi Brief Contents

Chapter 10 The Tower of Babel:


Programmierung
Languages   480
Chapter 11 Compilers and Language
Translation   542
Chapter 12 Models of
Computation   588

LEVEL 5 Applications   636
Chapter 13 Simulation and
Modeling   638
Chapter 14 Ecommerce, Databases,
and Data Science   670
Chapter 15 Artificial Intelligence   712
Chapter 16 Computer Graphics and
Entertainment: Movies,
Games, and Virtual
Communities   758

LEVEL 6 Social Issues in Computing   790


Chapter 17 Making Decisions about
Computers, Information,
and Society   792

Answers to Practice Problems   833


Index   877

Online Chapters
This text includes five language-specific online-only downloadable
chapters on Ada, C++, C#, Java, and Python, available on the com-
panion site for this text (www.cengage.com) and in MindTap.

Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 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.
Contents

Preface to the Eighth Edition    xix

Chapter 1 An Introduction to Computer Science   2


Introduction   2
1.1  
Special Interest Box: In the Beginning . . .    5
1.2  The Definition of Computer Science   6
Special Interest Box: Abu Ja’far Muhammad ibn
Musa Al-Khwarizmi (AD 780–850?)    10
1.3  Algorithms   12
1.3.1  The Formal Definition of an Algorithm    12
1.3.2  The Importance of Algorithmic
Problem Solving   17
Practice Problems   18
1.4  A Brief History of Computing    18
1.4.1  The Early Period: Up to 1940    18
Special Interest Box: The Original “Technophobia”    22
Special Interest Box: Charles Babbage (1791–1871)
Ada Augusta Byron, Countess of Lovelace (1815–1852)    24
1.4.2  The Birth of Computers: 1940–1950    24
Special Interest Box: John Von Neumann (1903–1957)    28
1.4.3  The Modern Era: 1950 to the Present    28
Special Interest Box: And the Verdict Is . . .    29
Special Interest Box: The World’s First Microcomputer    31
1.5  Organization of the Text   34
Laboratory Experience 1   38
EXERCISES   39
CHALLENGE WORK   41

LEVEL 1 The Algorithmic Foundations


of Computer Science   42
Chapter 2 Algorithm Discovery and Design    44
2.1  
Introduction   44
2.2  
Representing Algorithms   44
2.2.1  Pseudocode   44
2.2.2  Sequential Operations   48
2.2.3  Conditional and Iterative Operations    50

Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202 vii
Copyright 2019 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

Practice Problems   51
Special Interest Box: From Little Primitives Mighty
Algorithms Grow   60
2.3  Examples of Algorithmic Problem Solving    60
2.3.1   Example 1: Go Forth and Multiply    60
Practice Problems   61
Practice Problems   64
2.3.2  Example 2: Looking, Looking,
Looking   65
Laboratory Experience 2   70
2.3.3   Example 3: Big, Bigger, Biggest    70
Practice Problems   76
Laboratory Experience 3   76
2.3.4   Example 4: Meeting Your Match    77
Special Interest Box: Hidden Figures   84
2.4  Conclusion   84
Practice Problems   85
EXERCISES   86
CHALLENGE WORK   89

Chapter 3 The Efficiency of Algorithms    92


Introduction   92
3.1  
Attributes of Algorithms   92
3.2  
Practice Problems   97
3.3  Measuring Efficiency   97
3.3.1  Sequential Search   97
3.3.2  Order of Magnitude—Order n   100
Special Interest Box: Flipping Pancakes   102
3.3.3  Selection Sort   102
Practice Problem   103
Practice Problems   109
3.3.4  Order of Magnitude—Order n2   109
Special Interest Box: The Tortoise and the Hare    113
Laboratory Experience 4   114
Practice Problem   115
3.4  Analysis of Algorithms   115
3.4.1  Data Cleanup Algorithms   115
3.4.2  Binary Search   123
Practice Problems   123
Practice Problems   129
Laboratory Experience 5   130
3.4.3  Pattern Matching   130
3.4.4  Summary   131
Practice Problem   132
3.5  When Things Get Out of Hand    132
Practice Problems   137
3.6  Summary of Level 1    137
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 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.
Contents ix

Laboratory Experience 6   138


EXERCISES   139
CHALLENGE WORK   149

LEVEL 2 The Hardware World   150


Chapter 4 The Building Blocks: Binary Numbers, Boolean
Logic, and Gates   152
Introduction   152
4.1  
The Binary Numbering System    153
4.2  
B
 inary
Representation of Numeric and
4.2.1  
Textual Information   153
Special Interest Box: A Not So Basic Base    158
Practice Problems   166
4.2.2   Binary Representation of Sound
and Images   167
Practice Problems   175
4.2.3  The Reliability of Binary
Representation   176
4.2.4   Binary Storage Devices   177
Special Interest Box: Moore’s Law and the Limits
of Chip Design   182
4.3  Boolean Logic and Gates   183
4.3.1   Boolean Logic   183
Practice Problems   187
4.3.2   Gates   188
Special Interest Box: George Boole (1815–1864)    192
4.4  Building Computer Circuits   193
4.4.1   Introduction   193
4.4.2   A Circuit Construction Algorithm    195
Practice Problems   199
4.4.3  Examples of Circuit Design and
­Construction   200
Laboratory Experience 7   200
Laboratory Experience 8   208
Practice Problems   209
Special Interest Box: Dr. William Shockley
(1910–1989)   209
4.5  Control Circuits   211
4.6  Conclusion   215
EXERCISES   217
CHALLENGE WORK   220

Chapter 5 Computer Systems Organization   222


Introduction   222
5.1  
The Components of a Computer System   225
5.2  
Memory
5.2.1   and Cache   227
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 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

Special Interest Box: Powers of 10    230


Input/Output and Mass Storage    238
5.2.2  
Practice Problems   239
Practice Problems   244
The Arithmetic/Logic Unit   245
5.2.3  
The Control Unit   249
5.2.4  
Practice Problems   256
5.3  Putting the Pieces Together—the Von Neumann
Architecture   258
Special Interest Box: An Alphabet Soup of Speed
Measures: MHz, GHz, MIPS, and GFLOPS    264
Laboratory Experience 9   265
5.4   Non–Von Neumann Architectures   265
Special Interest Box: Speed to Burn    269
5.5   Summary of Level 2   271
Special Interest Box: Quantum Computing   272
EXERCISES   273
CHALLENGE WORK   276

LEVEL 3 The Virtual Machine   278


Chapter 6 An Introduction to System Software and
Virtual Machines   280
Introduction   280
6.1  
System Software   282
6.2  
The Virtual Machine   282
6.2.1  
Types of System Software    284
6.2.2  
Assemblers and Assembly Language   286
6.3  
6.3.1   Assembly Language   286
Practice Problems   294
6.3.2  Examples of Assembly Language
Code   295
Practice Problems   299
Laboratory Experience 10   300
6.3.3  Translation and Loading   300
Practice Problems   307
6.4  Operating Systems   308
6.4.1   Functions of an Operating System    308
Special Interest Box: A Machine for the Rest of Us    311
Practice Problems   315
6.4.2   Historical Overview of Operating ­Systems
Development   318
Special Interest Box: Now That’s Big!    320
6.4.3   The Future   327
Special Interest Box: Gesture-Based Computing   330
EXERCISES   331
Challenge Work   334
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 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.
Contents xi

Chapter 7 Computer Networks and Cloud


Computing   336
Introduction   336
7.1  
Basic Networking Concepts   338
7.2  
Communication
7.2.1   Links   338
Special Interest Box: The Internet of Things    345
Practice Problems   346
7.2.2  Local Area Networks   346
Practice Problems   349
7.2.3  Wide Area Networks   349
7.2.4  Overall Structure of the Internet    351
Special Interest Box: Firewalls   354
7.3  Communication Protocols   356
7.3.1  Physical Layer   357
7.3.2  Data Link Layer   358
Practice Problems   362
7.3.3  Network Layer   363
Special Interest Box: I Can’t Believe We’ve Run Out    364
7.3.4  Transport Layer   366
Practice Problems   367
7.3.5  Application Layer   371
7.4  Network Services and Benefits   374
Laboratory Experience 11   375
7.4.1  Interpersonal Communications   375
7.4.2  Social Networking   376
7.4.3  Resource Sharing   376
7.4.4  Electronic Commerce   378
7.5   Cloud Computing   379
7.6   A History of the Internet and the World Wide
Web   382
7.6.1  The Internet   382
7.6.2  The World Wide Web    387
Special Interest Box: Geography Lesson   388
Special Interest Box: Net Neutrality   389
7.7   Conclusion   390
EXERCISES   390
CHALLENGE WORK   393

Chapter 8 Information Security   394


Introduction   394
8.1  
Threats and Defenses   395
8.2  
8.2.1  Authentication and Authorization   396
Special Interest Box: The Metamorphosis of Hacking    397
Practice Problems   401
8.2.2  Threats from the Network    402
Special Interest Box: Beware the Trojan Horse    403
Special Interest Box: Your Money or Your Files    404
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 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

Special Interest Box: Defense against the Dark Arts   406


Practice Problem   407
8.2.3  White Hats vs. Black Hats    407
8.3  Encryption   407
Special Interest Box: You’ve Been Hacked    408
8.3.1  Encryption Overview   409
8.3.2  Simple Encryption Algorithms   410
Practice Problems   412
Laboratory Experience 12   413
8.3.3  DES   413
Special Interest Box: Hiding in Plain Sight    413
8.3.4  Public-Key Systems   417
Special Interest Box: Quantum Computing vs. RSA    419
Practice Problem   419
8.4  Web Transmission Security   420
8.5  Embedded Computing   422
Special Interest Box: Mischief-Makers in the Internet
of Things   425
8.6  Conclusion   425
8.7  Summary of Level 3   426
EXERCISES   427
CHALLENGE WORK   429

LEVEL 4 The Software World   432


Chapter 9 Introduction to High-Level Language
Programming   434
The Language Progression   434
9.1  
Where
Do We Stand and What Do We
9.1.1  
Want?   435
9.1.2  Getting Back to Binary    438
9.2  A Family of Languages   439
Special Interest Box: Ada, C11, C#, Java,
and Python Online Chapters    439
9.3  Two Examples in Five-Part Harmony   440
9.3.1  Favorite Number   440
9.3.2  Data Cleanup (Again)   444
9.4   Feature Analysis   454
9.5   Meeting Expectations   454
9.6   The Big Picture: Software Engineering   463
9.6.1  Scaling Up   464
9.6.2  The Software Development Life Cycle    464
Special Interest Box: Vital Statistics for Real Code    466
9.6.3  Modern Environments   472
9.6.4  Agile Software Development   474

Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 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.
Contents xiii

Special Interest Box: Software Engineering Failures    475


9.7  Conclusion   476
EXERCISES   477
CHALLENGE WORK   477

Online Chapters
This text includes five language-specific online-only downloadable
chapters on Ada, C++, C#, Java, and Python, available on the com-
panion site for this text (www.cengage.com) and in MindTap.

Chapter 10 The Tower of Babel: Programming


Languages   480
Why Babel?   480
10.1  
Procedural Languages   482
10.2  
Plankalkül   482
10.2.1  
10.2.2  Fortran   483
COBOL   484
10.2.3  
Special Interest Box: Old Dog, New Tricks #1    485
Practice Problems   486
Practice Problem   487
Special Interest Box: Uncle Sam Wants Who?   487
10.2.4  C/C11   488
Practice Problems   492
10.2.5  Ada   492
Practice Problem   493
10.2.6  Java   494
Practice Problem   496
10.2.7  Python   496
10.2.8  C# and .NET   497
Practice Problem   497
Special Interest Box: The “Popularity” Contest    498
Special Interest Box: Old Dog, New Tricks #2    500
Practice Problem   501
10.3  Special-Purpose Languages   501
10.3.1  SQL   501
10.3.2  HTML   502
Laboratory Experience 13   505
10.3.3  JavaScript   505
Special Interest Box: Beyond HTML   506
Special Interest Box: PHP   509
Practice Problems   509
10.3.4  R   510

Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 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 Contents

Alternative Programming Paradigms   513


10.4  
Funktional
10.4.1   Programming   513
Special Interest Box: It’s All in How You
Look, Look, Look, . . . at It    518
Practice Problems   519
Laboratory Experience 14   520
10.4.2  Logic Programming   520
Practice Problems   525
10.4.3  Parallel Programming   526
Special Interest Box: New Dogs, New Tricks    531
Practice Problems   532
10.5  New Languages Keep Coming   532
10.5.1  Go   532
Special Interest Box: Go is Going Places    533
10.5.2  Swift   534
10.5.3  Milk   535
10.6  Conclusion   535
EXERCISES   537
Challenge Work   540

Chapter 11 Compilers and Language Translation    542


Introduction   542
11.1  
The Compilation Process   545
11.2  
Phase
I: Lexical Analysis    546
11.2.1  
Phase
II: Parsing   550
11.2.2  
Practice Problems   550
Practice Problems   556
Practice Problems   567
11.2.3  Phase III: Semantics and Code
­Generation   568
Practice Problem   577
11.2.4   Phase IV: Code Optimization    577
Laboratory Experience 15   577
Special Interest Box: “Now I Understand,”
Said the Machine   582
11.3   Conclusion   583
EXERCISES   584
CHALLENGE WORK   587

Chapter 12 Models of Computation   588


12.1   Introduction   588
12.2   What Is a Model?   589
12.3  A Model of a Computing Agent   591
Properties
12.3.1  of a Computing Agent    591
Practice Problems   592
12.3.2  The Turing Machine   593
Special Interest Box: Alan Turing, Brilliant Eccentric    593
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 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.
Contents xv

Practice Problems   600
12.4   A Model of an Algorithm   602
12.5   Turing Machine Examples   604
12.5.1  A Bit Inverter   605
Practice Problems   607
12.5.2  A Parity Bit Machine    607
12.5.3  Machines for Unary Incrementing    610
Practice Problem   610
12.5.4  A Unary Addition Machine    614
Practice Problems   616
Laboratory Experience 16   616
12.6   The Church–Turing Thesis   617
Special Interest Box: The Turing Award    618
12.7   Unsolvable Problems   621
Special Interest Box: Couldn’t Do, Can’t Do, Never
Will Be Able to . . .    626
Practice Problems   626
Laboratory Experience 17   627
12.8   Conclusion   627
12.9   Summary of Level 4   628
EXERCISES   629
CHALLENGE WORK   633

LEVEL 5 Applications   636
Chapter 13 Simulation and Modeling   638
Introduction   638
13.1  
Computational Modeling   639
13.2  
Introduction
13.2.1   to Systems and Models    639
Computational
13.2.2   Models, Accuracy,
and Errors   642
13.2.3  An Example of Model Building    644
Practice Problems   653
Laboratory Experience 18   654
13.3  Running the Model and Visualizing Results   654
13.4   Conclusion   664
Special Interest Box: The Mother of All
Computations!   664
EXERCISES   665
CHALLENGE WORK   667

Chapter 14 Ecommerce, Databases, and Data


Science   670
Introduction   670
14.1  
Ecommerce   671
14.2  
Special Interest Box: Shopping on the Web    672
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 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

Decisions, Decisions   673
14.2.1  
Anatomy of a Transaction    675
14.2.2  
Special Interest Box: A Rose by Any Other Name. . .    677
14.2.3  Designing Your Website   680
Special Interest Box: Less Is More    682
14.2.4  Behind the Scenes   682
Practice Problems   683
14.2.5  Other Ecommerce Models   683
14.2.6  Electronic Payment Systems   685
Special Interest Box: Blockchain: A New Revolution?    687
14.3  Databases   688
14.3.1  Data Organization   688
14.3.2  Database Management Systems   690
14.3.3  Other Considerations   696
Special Interest Box: SQL, NoSQL, NewSQL    697
Practice Problems   698
Laboratory Experience 19   699
14.4  Data Science   699
14.4.1  Tools   700
Special Interest Box: Algorithm Bias   703
Practice Problem   704
14.4.2  Personal Privacy   704
Special Interest Box: What Your Smartphone
Photo Knows   705
14.4.3  For the Greater Good    706
14.5  Conclusion   707
EXERCISES   708
CHALLENGE WORK   711

Chapter 15 Artificial Intelligence   712


Introduction   712
15.1  
Special Interest Box: Victory in the Turing Test?    714
15.2  A Division of Labor   715
Special Interest Box: Predicted AI Milestones     718
15.3  Knowledge Representation   718
Practice Problems   722
15.4  Recognition Tasks   723
Special Interest Box: Brain on a Chip     728
Laboratory Experience 20   729
Practice Problems   730
15.5  Reasoning Tasks   730
15.5.1  Intelligent Searching   730
15.5.2  Swarm Intelligence   733
Special Interest Box: Robot Swarms   734
15.5.3  Intelligent Agents   734
15.5.4  Expert Systems   736

Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 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.
Contents xvii

Practice Problems   739
15.5.5  The Games We Play    739
15.6  Robots and Drones   744
15.6.1  Robots   744
Special Interest Box: Wait—Where Am I?    746
15.6.2  Drones   749
15.7  Conclusion   751
EXERCISES   752
CHALLENGE WORK   754

Chapter 16 Computer Graphics and Entertainment: Movies,


Games, and Virtual Communities   758
Introduction   758
16.1  
Computer-Generated Imagery (CGI)   761
16.2  
16.2.1  Introduction
to CGI   761
Special Interest Box: Computer Horsepower   763
16.2.2  How It’s Done: The Graphics
Pipeline   763
16.2.3   Object Modeling   764
16.2.4   Object Motion   767
Practice Problem   768
Practice Problem   772
16.2.5   Rendering and Display   772
16.2.6   The Future of CGI    775
16.3  Video Gaming   776
Special Interest Box: The Good, the Bad, and
the Ugly   780
16.4  Multiplayer Games and Virtual Communities   781
16.5   Conclusion   783
Special Interest Box: The Computer Will See You
Now   784
16.6   Summary of Level 5   785
Exercises   786
Challenge Work   788

LEVEL 6 Social Issues in Computing   790


Chapter 17 Making Decisions about Computers,
Information, and Society   792
Introduction   792
17.1  
Case Studies   793
17.2  
17.2.1  Case 1: Is It Sharing or Stealing?    793
Special Interest Box: Death of a Dinosaur    797
Practice Problems   800
Special Interest Box: The Sound of Music    801

Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 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 Contents

17.2.2  Case
2: Legalized Snooping—Privacy vs.
Security   801
Special Interest Box: Hero or Traitor?    803
Practice Problems   809
Case 3: Hackers—Public Enemies
17.2.3  
or Gadflies?   809
Practice Problems   815
17.2.4  Case 4: Genetic Information
and Medical Research   815
Special Interest Box: Professional Codes of Conduct    821
17.3  Personal Privacy and Social Media   822
Practice Problems   826
17.4   Fake News, Politics, and Social Media   827
17.5   Conclusion   830
17.6   Summary of Level 6   830
EXERCISES   831

Answers to Practice Problems   833


Index   877

Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 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.
Preface to the Eighth
Edition

Overview
This text is intended for a one-semester introductory course in computer
science. It presents a broad-based overview of the discipline that assumes
no prior background in computer science, programming, or mathematics. It
would be appropriate for a college or university service course for students
not majoring in computer science, as well as for schools that implement
their first course for majors using a breadth-first approach that surveys the
fundamental aspects of computer science. It would be highly suitable for
a high school computer science course, especially the AP Computer Sci-
ence Principles course created by the College Board in cooperation with
the National Science Foundation and colleges and universities around the
United States.

The Non-Majors Service Course


The introductory computer science service course (often called CS 0) has
undergone numerous changes. In the 1970s and early 1980s, it was usu-
ally a class in FORTRAN, BASIC, or Pascal programming. In the mid-to-late
1980s, a rapid increase in computer use caused the service course to evolve
into something called “computer literacy,” in which students learned about
new applications of computing in fields such as business, medicine, law,
and education. With the growth of personal computers and productivity
software, a typical early to mid-1990s version of this course would teach
students how to use word processors, databases, spreadsheets, and email.
The most recent change was its evolution into a web-centric course in which
students learned to design and implement webpages using HTML, XML,
ASP, and Java applets.
In many institutions, the computer science service course is evolving
once again. There are two reasons for this change. First, virtually all col-
lege and high school students are familiar with personal computers and

Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202 xix
Copyright 2019 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.
xx Preface to the Eighth Edition

productivity software. They have been using word processors and search
engines since elementary school and are familiar with social media, online
retailing, and email; many have designed webpages and even manage their
own websites and blogs. In today’s world, a course that focuses on comput-
ing applications would be of little or no interest.
But a more important reason for rethinking the structure of the CS 0
service course, and the primary reason why we authored this book, is the
following observation:
Most computer science service courses do not teach students the foun-
dations and fundamental concepts of computer science!
We believe that students in a computer science service course should receive
a solid grounding in the fundamental concepts of the discipline, just as
introductory courses in biology, physics, and geology present the central
concepts of their fields. Topics in a breadth-first computer science service
course would not be limited to “fun” applications such as webpage creation,
blogging, game design, and interactive graphics, but would also cover foun-
dational issues such as algorithms, abstraction, hardware, computer organi-
zation, system software, language models, and the social and ethical issues
of computing. An introduction to these core ideas exposes students to the
overall richness and beauty of the field and allows them not only to use
computers and software effectively, but also to understand and appreciate
the basic ideas underlying the discipline of computer science and the cre-
ation of computational artifacts. As a side benefit, students who complete
such a course will have a much better idea of what a major or a minor in
computer science will entail.
This last point was the primary reason for the development of the AP
Computer Science Principles high school course, which is quite similar to
the breadth-first overview model just described. By learning about the field
in its entirety, rather than seeing only the small slice of it called “program-
ming,” high school students will be in a better position to decide if computer
science is a subject they wish to study when they begin college.

The First Course for Majors


Since the emergence of computer science as an academic discipline in the
1960s, the first course in the major (often called CS 1) has usually been an
introduction to programming—from Fortran to BASIC to Pascal, and, later,
C++, Java, and Python. But today there are numerous alternatives, including
a breadth-first overview. A first course for computer science majors using the
breadth-first model emphasizes early exposure to the field’s sub-­disciplines
rather than placing exclusive emphasis on programming. This gives new
majors a complete and well-rounded understanding of the field, including
the concepts and ways of thinking that are part of computer science.
Our book—intended for either majors or non-majors—is organized around
this breadth-first approach as it presents a wide range of subject matter
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 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.
Preface to the Eighth Edition xxi

drawn from diverse areas of computer science. However, to avoid drowning


students in a sea of seemingly unrelated facts and details, a breadth-first
presentation must be carefully woven into a coherent fabric, a theme, a “big
picture” that ties together the individual topics and presents computer sci-
ence as a unified and integrated discipline. To achieve this, our text divides
the study of computer science into a hierarchy of six subareas, called layers,
with each layer building upon concepts presented in earlier chapters.

A Hierarchy of Abstractions
The central theme of this book is that computer science is the study of
­algorithms. Our hierarchy utilizes this definition by initially looking at the
algorithmic foundations of computer science and then moving upward from
this central theme to higher-level issues such as hardware, systems, software,
applications, and ethics.
The six levels in our computer science hierarchy are:
Level 1. The Algorithmic Foundations of Computer Science
Level 2. The Hardware World
Level 3. The Virtual Machine
Level 4. The Software World
Level 5. Applications
Level 6. Social Issues in Computing

Level 1
Following an introductory chapter, Level 1 (Chapters 2–3) introduces “The
Algorithmic Foundations of Computer Science,” the bedrock on which all
other aspects of the discipline are built. It presents fundamental ideas such as
the design of algorithms, algorithmic problem solving, abstraction, pseudo-
code, and iteration and illustrates these ideas using well-known examples. It
also introduces the concepts of algorithm efficiency and asymptotic growth
and demonstrates that not all algorithms are, at least in terms of running
time, created equal.
The discussions in Level 1 assume that our algorithms are executed by
something called a “computing agent,” an abstract concept for any entity
that can carry out the instructions in our solution.

Level 2
However, in Level 2 (Chapters 4–5), “The Hardware World,” we want our
algorithms to be executed by “real” computers to produce “real” results.
Thus begins our discussion of hardware, logic design, and computer orga-
nization. The initial discussion introduces the basic building blocks of com-
puter ­systems—binary numbers, Boolean logic, gates, and circuits. It then
shows how these elementary concepts can be combined to construct a real
computer using the Von Neumann architecture, composed of processors,
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 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.
xxii Preface to the Eighth Edition

memory, and input/output. This level presents a simple machine language


instruction set and explains how the algorithmic primitives of Level 1,
such as assignment and conditional, can be implemented in machine lan-
guage and run on the Von Neumann hardware of Level 2, conceptually
tying together these two areas. It ends with a discussion of important new
directions in hardware design—multicore processors and massively parallel
machines.
By the end of Level 2, students have been introduced to basic concepts
in logic design and computer organization, and they can appreciate the
complexity inherent in these ideas.

Level 3
This complexity is the motivation for the material contained in Level 3
(Chapters 6–8), “The Virtual Machine.” This section describes how system
software is used to create a user-friendly, user-oriented problem-solving
environment that hides many of the ugly hardware details just described.
Level 3 looks at the same problems discussed in Level 2, encoding and
executing algorithms, but shows how this can be done easily in a virtual
environment containing helpful tools like a graphical user interface, editors,
language translators, file systems, and debuggers. This section discusses the
services and responsibilities of the operating system and how it has evolved.
It investigates one of the most important virtual environments in current
use, computer networks, and shows how technologies such as Ethernet, the
Internet, and the web link together independent systems via transmission
media and communications software. This creates a virtual environment in
which we seamlessly and transparently use not only the computer on our
desk or in our hand, but also computing devices located around the world.
This transparency has progressed to the point where we can now use sys-
tems located “in the cloud” without regard for where they are, how they
provide their services, and even whether they exist as real physical entities.
Level 3 concludes with a look at one of the most important services provided
by a virtual machine, namely information security, and describes algorithms
for protecting the user and the system from accidental or malicious damage.

Level 4
Once we have created this powerful user-oriented virtual environment, what
do we want to do with it? Most likely we want to write programs to solve
interesting problems. This is the motivation for Level 4 (Chapters 9–12), “The
Software World.” Although this book should not be viewed as a program-
ming text, it contains an overview of the features found in modern procedural
programming languages. This gives students an appreciation for the inter-
esting and challenging task of the computer programmer and the power of
the problem-solving environment created by a modern high-level language.
(More detailed introductions to five important high-level programming lan-
guages are available via online, downloadable chapters accessible through
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 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.
Preface to the Eighth Edition xxiii

MindTap, as well as at www.cengage.com.) There are many different language


models, so Level 4 also includes a discussion of other language types, includ-
ing special-purpose languages such as SQL, HTML, JavaScript, and R, as well
as the functional, logic, and parallel language paradigms. An introduction to
the design and construction of a compiler shows how high-level languages
can be translated into machine language for execution. This latter discussion
ties together numerous ideas from earlier chapters, as we show how an algo-
rithm (Level 1), expressed in a high-level language (Level 4), can be compiled
and executed on a typical Von Neumann machine (Level 2) using system
software tools (Level 3). These “recurring themes” and frequent references to
earlier concepts help reinforce the idea of computer science as an integrated
set of topics. At the conclusion of Level 4, we introduce the idea of comput-
ability and insolvability to show students that there are provable limits to
what programs, computers, and computer science can achieve.

Level 5
We now have a high-level programming environment in which it is possible
to write programs to solve important problems. In Level 5 (Chapters 13–16),
“Applications,” we take a look at some important uses of computers. There is
no way to cover more than a fraction of the many applications of computers
and information technology in a single section. We have included applica-
tions drawn from the sciences and engineering (simulation and modeling),
business and finance (ecommerce, databases, data science), the social sci-
ences (artificial intelligence), and everyday life (computer-generated imag-
ery, video gaming, virtual communities). Our goal is to show students that
these applications are not “magic boxes” whose inner workings are totally
unfathomable. Rather, they are the direct result of building upon the core
concepts of computer science presented in the previous chapters.

Level 6
Finally, we reach the highest level of study, Level 6 (Chapter 17), “Social
Issues in Computing,” which addresses the social, ethical, moral, and legal
issues raised by pervasive computer technology. This section, based on con-
tributions by Professor Bo Brinkman of Miami University, examines issues
such as the theft of intellectual property, national security concerns, the
erosion of personal privacy, and the political impact of the proliferation of
fake news distributed using social media. This chapter does not attempt to
provide easy solutions to these many-faceted problems. Instead, it focuses
on techniques that students can use to think about ethical issues and reach
their own conclusions. Our goal in this final section is to make students
aware of the enormous impact that information technology is having on our
society and to give them tools for making informed decisions.
This, then, is the hierarchical structure of our text. It begins with the
algorithmic foundations of the discipline and works its way from lower-
level hardware concepts through virtual machine environments, high-level
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2019 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.
Another random document with
no related content on Scribd:
“Sooner or later she may,” the young woman said, still with the
thoughtful air upon her. “But I am as much in the dark about this
query as anybody—perhaps as the boys themselves.”
“Humph!” muttered the major. “Which of them likes her the better?”
“And that I’d like to know,” said his sister earnestly. “There is
another thing, Dorothy: Which of my sons is destined to fall in love
with this very, very pretty girl you have invited here—Jennie
Hapgood, I mean?”
“Oh! they’re all doing it, are they?” grunted the major. “How about
our Dorothy? Where does she come in? No mate for her?”
“I think I shall probably become an old maid,” Dorothy Dale said,
but with a conscious flush that made her aunt watch her in a puzzled
way for some time.
But the major put back his head and laughed delightedly. “No
more chance of your remaining a spinster—when you are really old
enough to be called one—than there is of my leading troops into
battle again,” he declared with warmth. “Hey, Sister?”
“Our Dorothy is too attractive I am sure to escape the chance to
marry, at least,” said Aunt Winnie, still watching her niece with
clouded gaze. “I wonder whence the right knight will come riding—
from north, or south, east or west?”
And in spite of herself Dorothy flushed up again at her aunt’s last
word.
It was a question oft-repeated in Dorothy Dale’s mind during the
following days, this one regarding the state of mind of her two
cousins and her two school friends.
It had always seemed to Dorothy, whenever she had thought of it,
that one of her cousins, either Ned or Nat, must in the end be
preferred by Tavia. To think of Tavia’s really settling down to caring
for any other man than Ned or Nat, was quite impossible.
On the other hand, the boys had both shown a great fondness for
the society of Jennie Hapgood when they were all at her home in
Pennsylvania such a short time previous; and now that all four were
together again Dorothy could not guess “which was which” as Tavia
herself would have said.
The boys did not allow Dorothy to be overlooked in any particular.
She was not neglected in the least; yet she did, as the days passed,
find more time to spend with her father and with her Aunt Winnie.
“The little captain is getting more thoughtful. She is steadying
down,” the major told Mrs. White.
“But I wonder why?” was that good woman’s puzzled response.
Dorothy Dale sitting by herself with a book that she was not
reading or with fancywork on which she only occasionally took
stitches, was entirely out of her character. She had never been this
way before going to New York, Mrs. White was sure.
There were several uncertainties upon the girl’s mind. One of them
almost came to light when, after ten days, her letter addressed to
“Mr. Garford Knapp, Desert City,” was returned to her by the post-
office department, as instructed in the upper left-hand corner of the
envelope.
Her letter, warning Garry Knapp of the advantage the real estate
men wished to take of him, would, after all, do him no good. He
would never know that she had written. Perhaps her path and Garry
Knapp’s would never cross again.
CHAPTER XIII
DOROTHY MAKES A DISCOVERY

The boys had a dog—Old Brindle he was called—and he had just


enough bull in him to make him a faithful friend and a good
watchdog. But, of course, he was of little use in the woods, and Joe
and Roger were always begging for a hunting dog.
“We’ve got these now—pump-rifles,” Roger said eagerly to
Dorothy, whom he thought able to accomplish any wonder she might
undertake. “They shoot fifty shots. Think of it, Sister! That’s a lot. And
father taught us how to use ’em long ago, of course. Just think! I
could stand right up and shoot down fifty people—just like that.”
“Oh, Roger!” gasped Dorothy. “Don’t say such awful things.”
“Oh, I wouldn’t, you know; but I could,” the boy said confidently.
“Now the law is off rabbits and partridges and quail. Joe and I saw
lots of ’em when we went after those nuts the other day. If we’d had
our guns along maybe we might have shot some.”
“The poor little birds and the cunning little rabbits,” said Dorothy
with a sigh.
“Oh! they’re not like our pigeons and our tame rabbits. These are
real wild. If some of ’em weren’t shot they’d breed an’ breed till there
were so many that maybe it wouldn’t be safe to go out into the
woods,” declared the small boy, whose imagination never needed
spurring.
Joe came up on the porch in time to hear this last. He chuckled,
but Dorothy was saying to Roger:
“How foolish, dear! Who ever heard of a rabbit being cross?”
“Just the same I guess you’ve heard of being as ‘mad as a March
hare,’ haven’t you?” demanded Joe, his eyes twinkling. “And we do
want a bird dog, Sis, to jump a rabbit for us, or to flush a flock of
quail.”
“Those dear little bobwhites,” Dorothy sighed again. “Why is it that
boys want always to kill?”
“So’s to eat,” Joe said bluntly. “You know yourself, Dorothy Dale,
that you like partridge on toast and rabbit stew.”
She laughed at them. “I shall go hungry, then, I’m afraid, as far as
you boys are concerned.”
“Of course we can’t get any game if we don’t have a dog. Brindle
couldn’t jump a flea,” growled Joe.
“Say! the big fellows used to have lots more pets than we’ve got,”
complained Roger, referring to Ned and Nat.
“They had dogs,” added Joe. “A whole raft of ’em.”
“Oh, dear me!” exclaimed Dorothy. “I’ll see what can be done. But
another dog!”
“We won’t let him bite you, Sister,” proclaimed Roger. “We only
want him to chase rabbits or to start up the birds so we can shoot
’em.”
Dorothy’s “I’ll see” was, of course, taken by the boys themselves
as an out-and-out agreement to do as the boys desired. They were
convinced that if she gave her mind to it their sister could perform
almost any miracle. At least, she could always bring the rest of the
family around to her way of thinking.
Ned and Nat had opposed the bringing of another dog upon the
place. They were fond of old Brindle; but it must be confessed that
the watchdog was bad tempered where other dogs were concerned.
Brindle seldom went off the place; but if he saw any other dog
trespassing he was very apt to fly at the uninvited visitor. And once
the bull’s teeth were clinched in the strange animal’s neck, it took a
hot iron to make him loose his hold.
There had been several such unfortunate happenings, and Mrs.
White had paid several owners of dogs damages rather than have
trouble with the neighbors. She—and even the major—had strong
objections to the coming of any other dog upon the place as long as
Brindle lived.
So the chance for Joe and Roger to have their request granted
was small indeed. Nevertheless, “hope springs eternal,” especially in
the breast of a small boy who wants a dog.
“Maybe we can find somebody that’s got a good, trained dog and
will sell him to us, Roger,” Joe said, as they set forth from the house.
“But I haven’t got much money—only what’s in the bank, and I
can’t get that,” complained Roger.
“You spend all you get for candy,” scoffed Joe. “Now, I’ve got a
whole half dollar left of my month’s spending money. But you can’t
buy much of a dog for fifty cents.”
“Maybe somebody would give us a dog.”
“And folks don’t give away good dogs, either,” grumbled Joe.
“I tell you!” exclaimed Roger, suddenly. “I saw a stray dog
yesterday going down the lane behind our stables.”
“How do you know it was a stray dog?”
“’Cause it looked so. It was sneaking along at the edge of the
hedge and it was tired looking. Then, it had a piece of frayed rope
tied around its neck. Oh, it was a stray dog all right,” declared the
smaller boy eagerly.
“Where’d it go to?”
“Under Mr. Cummerford’s barn,” said Roger. “I bet we could coax it
out, if it’s still there.”
“Not likely,” grunted Joe.
Nevertheless, he started off at once in the direction indicated by
his brother, and the boys were soon at the stable of the neighbor
whose place adjoined The Cedars on that side.
Oddly enough, the dog was still there. He had crawled out and lay
in the sun beside the barn. He was emaciated, his eyes were red
and rolling, and he had a lame front paw. The gray, frayed rope was
still tied to his neck. He was a regular tramp dog.
But he allowed the boys to come close to him without making any
attempt to get away. He eyed them closely, but neither growled nor
wagged his tail. He was a “funny acting” dog, as Roger said.
“I bet he hasn’t had anything to eat for so long and he’s come so
far that he hasn’t got the spunk to wag his tail,” Joe said, as eager as
Roger now. “We’ll take him home and feed him.”
“He’s sure a stray dog, isn’t he, Joe?” cried the smaller boy. “I
haven’t ever seen him before around here, have you?”
“No. And I bet his owner won’t ever come after him,” said Joe,
picking up the end of the rope. “He’s just the kind of a dog we want,
too. You see, he’s a bird dog, or something like that. And when he’s
fed up and rested, I bet he’ll know just how to go after partridges.”
He urged the strange dog to his feet. The beast tottered, and
would have lain down again. Roger, the tender-hearted, said:
“Oh! he’s so hungry. Bet he hasn’t had a thing to eat for days.
Maybe we’ll have to carry him.”
“No. He’s too dirty to carry,” Joe said, looking at the mud caked
upon the long hair of the poor creature and the dust upon him. “We’ll
get him to the stable and feed him; then we’ll hose him off.”
Pulling at the rope he urged the dog on. The animal staggered at
first, but finally grew firmer on his legs. But he did not use the injured
fore paw. He favored that as he hopped along to the White stables.
Neither the coachman nor the chauffeur were about. There was
nobody to observe the dog or advise the boys about the beast.
Roger ran to the kitchen door to beg some scraps for their new
possession. The cook would always give Roger what he asked for.
When he came back Joe got a pan of water for the dog; but the
creature backed away from it and whined—the first sound he had
made.
“Say! isn’t that funny?” Joe demanded. “See! he won’t drink. You’d
think he’d be thirsty.”
“Try him with this meat,” Roger said. “Maybe he’s too hungry to
drink at first.”
The dog was undoubtedly starving. Yet he turned his head away
from the broken pieces of food Roger put down before his nose.
Joe had tied the rope to a ring on the side of the stable. The boys
stepped back to see if the dog would eat or drink if they were not so
close to him. Then it was that the creature flew into an awful spasm.
He rose up, his eyes rolling, trembling in every limb, and trying to
break the rope that fastened him to the barn. Froth flew from his
clashing jaws. His teeth were terrible fangs. He fell, rolling over,
snapping at the water-dish. The boys, even Joe, ran screaming from
the spot.
At the moment Dorothy, Tavia and Jennie came walking down the
path toward the stables. They heard the boys scream and all three
started to run. Ned and Nat, nearer the house, saw the girls running
and they likewise bounded down the sloping lawn.
Around the corner of the stables came Joe and Roger, the former
almost dragging the smaller boy by the hand. And, almost at the
same instant, appeared the dog, the broken rope trailing, bounding,
snapping, rolling over, acting as insanely as ever a dog acted.
“Oh! what’s the matter?” cried Dorothy.
“Keep away from that dog!” shrieked Tavia, stopping short and
seizing both Dorothy and Jennie. “He’s mad!”
The dog was blindly running, this way and that, the foam dripping
from his clashing jaws. He was, indeed, a most fearful sight. He had
no real intention in his savage charges, for a beast so afflicted with
rabies loses eyesight as well as sense; but suddenly he bounded
directly for the three girls.
They all shrieked in alarm, even Dorothy. Yet the latter the better
held her self-possession than the others. She heard Jennie scream:
“Oh, Ned!” while Tavia cried: “Oh, Nat!”
The young men were at the spot in a moment. Nat had picked up
a croquet mallet and one good blow laid the poor dog out—harmless
forever more.
Tavia had seized the rescuer’s arm, Jennie was clinging to Ned.
Dorothy, awake at last to the facts of the situation, made a great
discovery—and almost laughed, serious as the peril had been.
“I believe I know which is which now,” she thought, forgetting her
alarm.
SUDDENLY HE BOUNDED DIRECTLY FOR THE THREE GIRLS.
Dorothy Dale’s Engagement Page 108
CHAPTER XIV
TAVIA IS DETERMINED

“After that scare I’m afraid the boys will have to go without a bird
dog,” Tavia said that night as she and Dorothy were brushing their
hair before the latter’s dressing-glass.
Tavia and Jennie and Ned and Nat were almost inseparable during
the daytime; but when the time came to retire the flyaway girl had to
have an old-time “confab,” as she expressed it, with her chum.
Dorothy was so bright and so busy all day long that nobody
discovered—not even the major—that she was rather “out of it.” The
two couples of young folk sometimes ran away and left Dorothy busy
at some domestic task in which she claimed to find much more
interest than in the fun her friends and cousins were having.
“It would have been a terrible thing if the poor dog had bitten one
of us,” Dorothy replied. “Dr. Agnew, the veterinary, says without
doubt it was afflicted with rabies.”
“And how scared your Aunt Winnie was!” Then Tavia began to
giggle. “She will be so afraid of anything that barks now, that she’ll
want all the trees cut down around the house.”
“That pun is unworthy of you, my dear,” Dorothy said placidly.
“Dear me, Doro Doodlekins!” exclaimed Tavia, suddenly and
affectionately, coming close to her chum and kissing her warmly.
“You are such a tabby-cat all of a sudden. Why! you have grown up,
while the rest of us are only kids.”
“Yes; I am very settled,” observed Dorothy, smiling into the mirror
at her friend. “A cap for me and knitting very soon, Tavia. Then I shall
sit in the chimney corner and think——”
“Think about whom, my dear?” Tavia asked saucily. “That Garry
Knapp, I bet.”
“I wouldn’t bet,” sighed Dorothy. “It isn’t ladylike.”
“Oh—de-ah—me!” groaned Tavia. “You are thinking of him just the
same.”
“I happened to be just now,” admitted Dorothy, and without
blushing this time.
“No! were you really?” demanded Tavia, eagerly. “Isn’t it funny he
doesn’t write?”
“No. Not at all.”
“But you’d think he would write and thank you for your letter if
nothing more,” urged the argumentative Tavia.
“No,” said Dorothy again.
“Why not?”
“Because Mr. Knapp never got my letter,” Dorothy said, opening
her bureau drawer and pulling the letter out from under some things
laid there. “See. It was returned to-day.”
“Oh, Dorothy!” gasped Tavia, both startled and troubled.
“Yes. It—it didn’t reach him somehow,” Dorothy said, and she
could not keep the trouble entirely out of her voice.
“Oh, my dear!” repeated Tavia.
“And I am sorry,” her friend went on to say; “for now he will not
know about the intentions of those men, Stiffbold and Lightly.”
“But, goodness! it serves him right,” exclaimed Tavia, suddenly.
“He didn’t give us his right address.”
“He gave us no address,” said Dorothy, sadly.
“Why, yes! he said Desert City——”
“He mentioned that place and said that his land was somewhere
near there. But he works on a ranch, which, perhaps, is a long way
from Desert City.”
“That’s so,” grumbled Tavia. “I forgot he’s only a cowboy.”
At this Dorothy flushed a little and Tavia, looking at her sideways
and eagerly, noted the flush. Her eyes danced for a moment, for the
girl was naturally chock-full of mischief.
But in a moment the expression of Tavia Travers’ face changed.
Dorothy was pensively gazing in the glass; she had halted in her hair
brushing, and Tavia knew that her chum neither saw her own
reflection nor anything else pictured in the mirror. The mirror of her
mind held Dorothy’s attention, and Tavia could easily guess the
vision there. A tall, broad-shouldered, broad-hatted young man with
a frank and handsome face and a ready smile that dimpled one
bronzed cheek ever so little and wrinkled the outer corners of his
clear, far-seeing eyes.
Garry Knapp!
Tavia for the first time realized that Dorothy had found interest and
evidently a deep and abiding interest, in the young stranger from
Desert City. It rather shocked her. Dorothy, of all persons, to become
so very deeply interested in a man about whom they knew practically
nothing.
Tavia suddenly realized that she knew more about him than
Dorothy did. At least, she had been with Garry Knapp more than had
her friend. It was Tavia who had had the two hours’ tête-à-tête with
the Westerner at dinner on the evening before Garry Knapp
departed so suddenly for the West. All that happened and was said
at that dinner suddenly unrolled like a panorama before Tavia’s
memory.
Why! she could picture it all plainly. She had been highly delighted
herself in the recovery of her bag and in listening to Garry’s story of
how it had been returned by the cash-girl’s sister. And, of course,
she had been pleased to be dining alone with a fine looking young
man in a hotel dining-room. She had rattled on when her turn came
to talk, just as irresponsibly as usual.
Now, in thinking over the occasion, she realized that the young
man from the West had been a shrewd questioner. He had got her
started upon Dorothy Dale, and before they came to the little cups of
black coffee Tavia had told just about all she knew regarding her
chum.
The reader may be sure that all Tavia said was to Dorothy’s glory.
She had little need to explain to Garry Knapp what a beautiful
character Dorothy Dale possessed. Tavia had told about Dorothy’s
family, her Aunt Winnie’s wealth, the fortunes Major Dale now
possessed both in the East and West, and the fact that when
Dorothy came of age, at twenty-one, she would be wealthy in her
own right. She had said all this to a young man who was struggling
along as a cowpuncher on a Western ranch, and whose patrimony
was a piece of rundown land that he could sell but for a song, as he
admitted himself. “And no chorus to it!” Tavia thought.
“I’m a bonehead!” she suddenly thought fiercely. “Nat would say
my noodle is solid ivory. I know now what was the matter with Garry
Knapp that evening. I know why he rushed up to me and asked for
Dorothy, and was what the novelists call ‘distrait’ during our dinner.
Oh, what a worm I am! A miserable, squirmy worm! Ugh!” and the
conscience-stricken girl fairly shuddered at her own reflection in the
mirror and turned away quickly so that Dorothy should not see her
features.
“It’s—it’s the most wonderful thing. And it began right under my
nose, my poor little ‘re-trousered’ nose, as Joe called it the other day,
and I didn’t really see it! I thought it was just a fancy on Dorothy’s
part! And I never thought of Garry Knapp’s side of it at all! Oh, my
heaven!” groaned Tavia, deep in her own soul. “Why wasn’t I born
with some good sense instead of good looks? I—I’ve spoiled my
chum’s life, perhaps. Goodness! it can’t be so bad as that.
“Of course, Garry Knapp is just the sort of fellow who would raise
a barrier of Dorothy’s riches between them. Goodness me!” added
the practical Tavia, “I’d like to see any barrier of wealth stop me if I
wanted a man. I’d shin the wall in a hurry so as to be on the same
side of it as he was.”
She would have laughed at this fancy had she not taken a look at
Dorothy’s face again.
“Good-night!” she shouted into her chum’s ear, hugged her tight,
kissed her loudly, and ran away into her own room. Once there, she
cried all the time she was disrobing, getting into her lacy nightgown,
and pulling down the bedclothes.
Then she did not immediately go to bed. Instead, she tiptoed back
to the connecting door and closed it softly. She turned on the
hanging electric light over the desk.
“I’ll do it!” she said, with determined mien. “I’ll write to Lance
Petterby.” And she did so.
CHAPTER XV
THE SLIDE ON SNAKE HILL

Joe and Roger marched down at an early breakfast hour from the
upper regions of the big white house, singing energetically if not
melodiously a pæan of joy:

“‘The frog he would a-wooing go——


Bully for you! Bully for all!
The frog he would a-wooing go——
Bully for all, we say!’”

The boys’ determination to reach the low register of a bullfrog in


that “bully for all” line was very, very funny, especially in Roger’s
case, for his speaking voice was naturally a shrill treble.
Their joy, however, awoke any sleepers there might have been in
the house, and most of them came to their bedroom doors and
peered out.
“What’s the matter with you blamed little rascals?” Ned, in a purple
bathrobe, demanded.
“Wouldn’t you boys just as lief sing as to make that noise?” Nat, in
a gray robe, and at his door, questioned.
But he grinned at his small cousins, for it hadn’t been so long ago
that he was just as much of a boy as they were.
“Hello, kids!” cried Tavia, sticking out a tousled head from her
room. “Tell us: What’s the good news?”
Jennie Hapgood peered out for an instant, saw Ned and Nat, and
darted back with an exclamatory “Oh!”
“I—I thought something had happened,” she faintly said, closing
her door all but a crack.
“Something has,” declared Joe.
“What is it, boys?” asked Dorothy, appearing fully dressed from
her room. “The ice?”
“What ice?” demanded Tavia. “Has the iceman come so early? Tell
him to leave a big ten-cent piece.”
“Huh!” grunted Roger, “there’s a whole lot more than a ten-cent
piece outside, and you’d see it if you’d put up your shade. The whole
world’s ice-covered.”
“So it is,” Joe agreed.
“There was rain last evening, you know,” Dorothy said, starting
down the lower flight of stairs briskly. “And then it turned very cold.
Everything is sheathed in ice out-of-doors. Doesn’t the warm air from
the registers feel nice? I do love dry heat, even if it is more
expensive.”
“Bully!” roared Nat, who had darted back to run up the shade at
one of the windows in his room. “Look out, girls! it’s great.”
Every twig on every bush and tree and every fence rail and post
were covered with glistening ice. The sun, just rising red and rosy as
though he had but now come from a vigorous morning bath, threw
his rays in profusion over this fairy world and made a most
spectacular scene for the young people to look out upon. In an hour
all of them were out of doors to enjoy the spectacle in a “close up,”
as Tavia called it.
“And we all ought to have spectacles!” she exclaimed a little later.
“This glare is blinding, and we’ll all have blinky, squinty eyes by
night.”
“Automobile goggles—for all hands!” exclaimed Nat. “They’re all
smoked glasses, too. I’ll get ’em,” and he started for the garage.
“But no automobile to-day,” laughed Jennie. “Think of the skidding
on this sheet of ice.” For the ground was sheathed by Jack Frost, as
well as the trees and bushes and fences.
Joe and Roger, well wrapped up, were just starting from the back
door and Dorothy hailed them:
“Where away, my hearties? Ahoy!”
“Aw—we’re just going sliding,” said Roger, stuttering.
“Where?” demanded the determined older sister.
“Snake Hill,” said Joe, shortly. He loved Dorothy; but this having
girls “butting in” all the time frayed his manly patience.
“Take care and don’t get hurt, boys!” called Tavia, roguishly,
knowing well that the sisterly advice was on the tip of Dorothy’s
tongue and that it would infuriate the small boys.
“Aw, you——”
Joe did not get any farther, for Nat in passing gave him a look. But
he shrugged his shoulders and went on with Roger without replying
to Tavia’s advice.
“Oh, what fun!” cried Jennie Hapgood, suddenly. “Couldn’t we go
coasting?”
“Sure we could,” Ned agreed instantly. Lately he seemed to agree
with anything Jennie said and that without question.
“Tobogganing—oh, my!” cried Tavia, quick to seize upon a new
scheme for excitement and fun. Then she turned suddenly serious
and added: “If Dorothy will go. Not otherwise.”
Dorothy laughed at her openly. “Why not, Tavia?” she demanded.
“Are you afraid to trust the boys unless I’m along? I know they are
awful cut-ups.”
“I feel that Jennie and I should be more carefully chaperoned,”
Tavia declared with serious lips but twinkling eyes.
“Oh! Oh! OH!” in crescendo from Nat, returning in time to hear this.
“Who needs a ‘bag o’ bones’——Excuse me! ‘Chaperon,’ I mean?
What’s afoot?”
Just then he slipped on the glare ice at the foot of the porch steps
and went down with a crash.
“You’re not, old man,” cried Ned as the girls squealed. “I hope you
have your shock-absorbers on. That was a jim-dandy!”
“Did—did it hurt you, Nat?” begged Tavia, with clasped hands.
“Oh-ugh!” grunted Nat, gingerly arising and examining the handful
of goggles he carried to see if they were all right. “Every bone in my
body is broken. Gee! that was some smash.”
“Do it again, dear,” Ned teased. “Your mother didn’t happen to see
you and she’s at the window now.”
“Aw, you go fish!” retorted the younger brother, for his dignity was
hurt if nothing else. “Wish it had been you.”
“So do I,” sighed Ned. “I’d have done it so much more gracefully.
You see, practice in the tango and foxtrot, not to mention other and
more intricate dance steps, does help one. And you never would
give proper attention to your dancing, Sonny.”
“Here!” threatened Nat. “I’ll dance one of my fists off your ear——”
“I shall have to part you boys,” broke in Dorothy. “Threatening
each other with corporal punishment—and before the ladies.”
“Why,” declared Ned, hugging his brother in a bearlike hug as Nat
reached his level on the porch. “He can beat me to death if he likes,
the dear little thing! Come on, ’Thaniel. What do you say to giving the
girls a slide?”
“Heh?” ejaculated Nat. “What do you want to let ’em slide for? Got
sick of ’em so quick? Where are your manners?”
“Oh, Ned!” groaned Tavia. “Don’t you want us hanging around any
more?”
“I am surprised at Mr. Edward,” Jennie joined in.
“Gee, Edward,” said Nat, grinning, “but you do put your foot in your
mouth every time you open it.”
Dorothy laughed at them all, but made no comment. Despite her
late seriousness she was jolly enough when she was one of the
party. And she agreed to be one to-day.
It was decided to get out Nat’s old “double-ripper,” see that it was
all right, and at once start for Snake Hill, where the smaller boys had
already gone.
“For this sun is going to melt the ice a good deal by noon. Of
course, it will be only a short cold snap this time of year,” Dorothy
said, with her usual practical sense.
They were some time in setting out, and it was not because the
girls “prinked,” as Tavia pointed out.
“I’d have you know we have been waiting five whole minutes,” she
proclaimed when Ned and Nat drew the long, rusty-ironed, double-
ripper sled out of the barn. “For once you boys cannot complain.”
“Those kids had been trying to use this big sled, I declare,” Nat
said. “And I had to find a couple of new bolts. Don’t want to break
down on the hill and spill you girls.”
“That would be spilling the beans for fair,” Ned put in. “Oh, beg
pardon! Be-ings, I mean. Get aboard, beautiful beings, and we’ll drag
you to the foot of the hill.”
They went on down the back road and into the woods with much
merriment. The foot of Snake Hill was a mile and a half from The
Cedars. Part of the hill was rough and wild, and there was not a farm
upon its side anywhere.
“I wonder where the kids are making their slide?” said Tavia,
easily.
“That’s why I am glad we came this way,” Dorothy confessed.
“They might be tempted to slide down on this steep side, instead of
going over to the Washington Village road. That’s smooth.”
“Trust the boys for finding the most dangerous place,” Jennie
Hapgood remarked. “I never saw their like.”
“That’s because you only have an older brother,” said Dorothy,
wisely. “He was past his reckless age while you were still in
pinafores and pigtails.”

You might also like