100% found this document useful (5 votes)
355 views

Get (Ebook PDF) Introduction To JAVA Programming and Data Structures Comprehensive Version 11 Free All Chapters

JAVA

Uploaded by

kindahceeya
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (5 votes)
355 views

Get (Ebook PDF) Introduction To JAVA Programming and Data Structures Comprehensive Version 11 Free All Chapters

JAVA

Uploaded by

kindahceeya
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

Download the full version of the ebook now at ebooksecure.

com

(eBook PDF) Introduction to JAVA Programming


and Data Structures Comprehensive Version 11

https://ebooksecure.com/product/ebook-pdf-
introduction-to-java-programming-and-data-
structures-comprehensive-version-11/

Explore and download more ebook at https://ebooksecure.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

(eBook PDF) Introduction to Java Programming and Data


Structures, Comprehensive Version, 11th Global Edition

https://ebooksecure.com/product/ebook-pdf-introduction-to-java-
programming-and-data-structures-comprehensive-version-11th-global-
edition/
ebooksecure.com

Introduction to Java Programming, Comprehensive Version


10th edition- eBook PDF

https://ebooksecure.com/download/introduction-to-java-programming-
comprehensive-version-ebook-pdf/

ebooksecure.com

(eBook PDF) Java Foundations: Introduction to Program


Design and Data Structures 5th Edition

https://ebooksecure.com/product/ebook-pdf-java-foundations-
introduction-to-program-design-and-data-structures-5th-edition/

ebooksecure.com

(Original PDF) Differential Equations with Boundary-Value


Problems 9th

https://ebooksecure.com/product/original-pdf-differential-equations-
with-boundary-value-problems-9th/

ebooksecure.com
World Regions in Global Context: Peoples, Places, and
Environments 6th Edition by Sallie A. Marston (eBook PDF)

https://ebooksecure.com/product/world-regions-in-global-context-
peoples-places-and-environments-6th-edition-by-sallie-a-marston-ebook-
pdf/
ebooksecure.com

(eBook PDF) Financial Management: Theory & Practice 16th


Edition

https://ebooksecure.com/product/ebook-pdf-financial-management-theory-
practice-16th-edition/

ebooksecure.com

(eBook PDF) Essentials of Human Anatomy & Physiology 12th


Edition

https://ebooksecure.com/product/ebook-pdf-essentials-of-human-anatomy-
physiology-12th-edition/

ebooksecure.com

Radar Remote Sensing: Applications and Challenges 1st


Edition- eBook PDF

https://ebooksecure.com/download/radar-remote-sensing-applications-
and-challenges-ebook-pdf/

ebooksecure.com

(eBook PDF) Fundamentals of Machine Component Design 6th


Edition

https://ebooksecure.com/product/ebook-pdf-fundamentals-of-machine-
component-design-6th-edition/

ebooksecure.com
(eBook PDF) Chemical Principles 7th Edition by Peter
Atkins

https://ebooksecure.com/product/ebook-pdf-chemical-principles-7th-
edition-by-peter-atkins/

ebooksecure.com
Introduction to JAVA™
Introduction to Java™ Programming and Data Structures
Comprehensive Version

Eleventh Edition

Y. Daniel Liang

Armstrong State University

330 Hudson Street, NY NY 10013


To Samantha, Michael, and Michelle
Senior Vice President Courseware Portfolio ​Management: Marcia J. Horton
Director, Portfolio Management: Engineering, ​Computer Science & Global
Editions: Julian Partridge
Higher Ed Portfolio Management: Tracy Johnson (Dunkelberger)
Portfolio Management Assistant: Kristy Alaura
Managing Content Producer: Scott Disanno
Content Producer: Robert Engelhardt
Web Developer: Steve Wright
Rights and Permissions Manager: Ben Ferrini
Manufacturing Buyer, Higher Ed, Lake Side Communications Inc (LSC):
Maura Zaldivar-Garcia
Inventory Manager: Ann Lam
Marketing Manager: Demetrius Hall
Product Marketing Manager: Bram Van Kempen
Marketing Assistant: Jon Bryant
Cover Designer: Marta Samsel
Cover Photography: Germano Poli/123RF.com
Full-Service Project Management: Shylaja Gattupalli, SPi Global

Java™ and Netbeans™ screenshots ©2017 by Oracle Corporation, all rights


reserved. Reprinted with permission.

Credits and acknowledgments borrowed from other sources and reproduced,


with permission, in this textbook appear on the appropriate page within text.

Microsoft and/or its respective suppliers make no representations about the


suitability of the information ​contained in the documents and related graphics
published as part of the services for any purpose. All such documents and
related graphics are provided “as is” without warranty of any kind. Microsoft
and/or its respective suppliers hereby disclaim all warranties and conditions
with regard to this information, including all warranties and conditions of
merchantability, whether express, implied or statutory, fitness for a particular
purpose, title and non-infringement. In no event shall Microsoft and/or its
respective suppliers be liable for any special, indirect or consequential ​-
damages or any damages whatsoever resulting from loss of use, data or
profits, whether in an action of contract, negligence or other tortious action,
arising out of or in connection with the use or performance of ​information ​-
available from the services. The documents and related graphics contained
herein could include technical ​inaccuracies or typographical errors. Changes
are periodically added to the information herein. Microsoft and/or its
respective suppliers may make improvements and/or changes in the
product(s) and/or the program(s) described herein at any time. Partial screen
shots may be viewed in full within the software version specified.

Copyright © 2018, 2015, 2013, 2011 by Pearson Education, Inc., Hoboken,


New Jersey 07030. All rights reserved. Printed in the United States of
America. This publication is protected by Copyright, and permission should
be obtained from the publisher prior to any prohibited reproduction, storage
in a retrieval system, or ​transmission in any form or by any means, electronic,
mechanical, photocopying, recording, or likewise. To obtain permission(s) to
use material from this work, please submit a written request to Pearson
Education, Inc., Permissions Department, ​Pearson Education, Inc., Hoboken,
New Jersey 07030.

Many of the designations by manufacturers and sellers to distinguish their


products are claimed as trademarks. Where those designations appear in this
book, and the publisher was aware of a trademark claim, the designations
have been printed in initial caps or all caps.

Library of Congress Cataloging-in-Publication Data

Names: Liang, Y. Daniel, author.

Title: Introduction to Java programming and data structures / Y. Daniel

Liang, Armstrong State University.

Other titles: Introduction to Java programming

Description: Eleventh edition. Comprehensive version. | New York, NY :

Pearson Education, 2017. | Revised edition of: Introduction to Java

programming / Y. Daniel Liang, Armstrong Atlantic State University.


Tenth
edition. Comprehensive version. 2015. | Includes index.

Identifiers: LCCN 2017002082| ISBN 9780134670942 | ISBN 0134670949

Subjects: LCSH: Java (Computer program language)

Classification: LCC QA76.73.J38 L52 2017 | DDC 005.13/3--dc23 LC record


available at https://lccn.loc.gov/2017002082

1–17

ISBN-10: 0-13-467094-9

ISBN-13: 978-0-13-467094-2
Preface
Dear Reader,

Many of you have provided feedback on earlier editions of this book, and
your comments and suggestions have greatly improved the book. This edition
has been substantially enhanced in presentation, organization, examples,
exercises, and supplements.

The book is fundamentals first by introducing basic programming concepts


and techniques before designing custom classes. The fundamental concepts
and techniques of selection statements, loops, methods, and arrays are the
foundation for programming. Building this strong foundation prepares
students to learn object-oriented programming and advanced Java
programming.

fundamentals-first

This book teaches programming in a problem-driven way that focuses on


problem solving rather than syntax. We make introductory programming
interesting by using thought-​provoking problems in a broad context. The
central thread of early chapters is on problem solving. Appropriate syntax
and library are introduced to enable readers to write programs for solving the
problems. To support the teaching of programming in a problem-driven way,
the book provides a wide variety of problems at various levels of difficulty to
motivate students. To appeal to students in all majors, the problems cover
many application areas, including math, science, business, financial, gaming,
animation, and multimedia.

problem-driven

The book seamlessly integrates programming, data structures, and algorithms


into one text. It employs a practical approach to teach data structures. We
first introduce how to use various data structures to develop efficient
algorithms, and then show how to implement these data structures. Through
implementation, students gain a deep understanding on the efficiency of data
structures and on how and when to use certain data structures. Finally, we
design and implement custom data structures for trees and graphs.

data structures

The book is widely used in the introductory programming, data structures,


and algorithms courses in the universities around the world. This
comprehensive version covers fundamentals of programming, object-oriented
programming, GUI programming, data structures, algorithms, concurrency,
networking, database, and Web programming. It is designed to prepare
students to become proficient Java programmers. A brief version
(Introduction to Java Programming, Brief Version, Eleventh Edition) is
available for a first course on programming, commonly known as CS1. The
brief version contains the first 18 chapters of the comprehensive version. An
AP version of the book is also available for high school students taking an
AP Computer Science course.

comprehensive version

brief version

AP Computer Science

The best way to teach programming is by example, and the only way to learn
programming is by doing. Basic concepts are explained by example and a
large number of exercises with various levels of difficulty are provided for
students to practice. For our programming courses, we assign programming
exercises after each lecture.

examples and exercises

Our goal is to produce a text that teaches problem solving and programming
in a broad context using a wide variety of interesting examples. If you have
any comments on and ​suggestions for improving the book, please email me.

Sincerely,
Y. Daniel Liang

[email protected]

www.cs.armstrong.edu/liang

www.pearsonhighered.com/liang

ACM/IEEE Curricular 2013 and


ABET Course Assessment
The new ACM/IEEE Computer Science Curricular 2013 defines the Body of
Knowledge organized into 18 Knowledge Areas. To help instructors design
the courses based on this book, we provide sample syllabi to identify the
Knowledge Areas and Knowledge Units. The ​sample syllabi are for a three
semester course sequence and serve as an example for institutional ​-
customization. The sample syllabi are accessible from the Instructor Resource
Website.

Many of our users are from the ABET-accredited programs. A key


component of the ABET accreditation is to identify the weakness through
continuous course assessment against the course outcomes. We provide
sample course outcomes for the courses and sample exams for measuring
course outcomes on the ​Instructor Resource Website.

What’s New in This Edition?


This edition is completely revised in every detail to enhance clarity,
presentation, content, examples, and exercises. The major improvements are
as follows:

The book’s title is changed to Introduction to Java Programming and


Visit https://testbankfan.com
now to explore a rich
collection of testbank or
solution manual and enjoy
exciting offers!
Data Structures with new enhancements on data structures. The book
uses a practical approach to introduce design, implement, and use data
structures and covers all topics in a typical data structures course.
Additionally, it provides bonus chapters that cover advanced data
structures such as 2-4 trees, B-trees, and red-black trees.

Updated to the latest Java technology. Examples and exercises are


improved and simplified by using the new features in Java 8.

The default and static methods are introduced for interfaces in Chapter
13.

The GUI chapters are updated to JavaFX 8. The examples are revised.
The user interfaces in the examples and exercises are now resizable and
displayed in the center of the window.

Inner classes, anonymous inner classes, and lambda expressions are


covered using practical examples in Chapter 15.

More examples and exercises in the data structures chapters use lambda
expressions to simplify coding. Method references are introduced along
with the Comparator interface in Section 20.6.

The forEach method is introduced in Chapter 20 as a simple alternative


to the foreach loop for applying an action to each element in a
collection.

Use the default methods for interfaces in Java 8 to redesign and simplify
MyList, ​MyArrayList , MyLinkedList, Tree, BST, AVLTree, MyMap,
MyHashMap, MySet, MyHashSet, Graph, UnweightedGraph, and
WeightedGraph in Chapters 24–29.

Chapter 30 is brand new to introduce aggregate operations for collection


streams.

FXML and the Scene Builder visual tool are introduced in Chapter 31.

The Companion Website has been redesigned with new interactive quiz,
CheckPoint questions, animations, and live coding.

More than 200 additional programming exercises with solutions are


provided to the instructor on the Instructor Resource Website. These
exercises are not printed in the text.

Please visit www.pearsonhighered.com/liang for a complete list of new


features as well as correlations to the previous edition.

Pedagogical Features
The book uses the following elements to help students get the most from the
material:

The Objectives at the beginning of each chapter list what students


should learn from the chapter. This will help them determine whether
they have met the objectives after ​completing the chapter.

The Introduction opens the discussion with a thought-provoking


question to motivate the reader to delve into the chapter.

Key Points highlight the important concepts covered in each section.

Check Points provide review questions to help students track their


progress as they read through the chapter and evaluate their learning.

Problems and Case Studies, carefully chosen and presented in an easy-


to-follow style, teach problem solving and programming concepts. The
book uses many small, simple, and stimulating examples to demonstrate
important ideas.

The Chapter Summary reviews the important subjects that students


should understand and remember. It helps them reinforce the key
concepts they have learned in the chapter.

Quizzes are accessible online, grouped by sections, for students to do


self-test on ​programming concepts and techniques.
Programming Exercises are grouped by sections to provide students with
opportunities to apply the new skills they have learned on their own. The
level of difficulty is rated as easy (no asterisk), moderate (*), hard (**),
or challenging (***). The trick of learning programming is practice,
practice, and practice. To that end, the book provides a great many
exercises. Additionally, more than 200 programming exercises with
solutions are provided to the instructors on the Instructor Resource
Website. These exercises are not printed in the text.

Notes, Tips, Cautions, and Design Guides are inserted throughout the
text to offer valuable advice and insight on important aspects of program
development.

Note
Provides additional information on the subject and reinforces important
concepts.

Tip
Teaches good programming style and practice.

Caution
Helps students steer away from the pitfalls of programming errors.

Design Guide
Provides guidelines for designing programs.
Flexible Chapter Orderings
The book is designed to provide flexible chapter orderings to enable GUI,
exception ​handling, recursion, generics, and the Java Collections Framework
to be covered earlier or later. The ​diagram on the next page shows the chapter
dependencies.
Organization of the Book
The chapters can be grouped into five parts that, taken together, form a
Exploring the Variety of Random
Documents with Different Content
“Guess I shouldn’t have been so funny, whacking you that way,” Roy
muttered, and smiled weakly. “I don’t want that thing on my head, Teddy. If
Nell sees me coming all tied up she’ll think something happened.”
“And nothing did happen—we’ve just been to a tea, and you got a little
damp trying to do a six beat crawl in the punch bowl,” Teddy said
sarcastically. “Listen to me, bucko! They’ll know you took a spill. How can
they help knowing? But what of it? Tell ’em you got out all right—crawled
ashore. Remember that? You crawled ashore.”
He glanced at Roy significantly.
If any one else had saved his life and Roy were asked to say nothing of
it, he would have refused immediately. The smallest recompense one may
offer to his rescuer is to acknowledge the debt publicly. But between these
two there was no such formality. They were not concerned with what others
thought of their relationship to one another. Calmly each accepted the full
devotion of his brother, knowing that his own was accepted in turn. Thus,
when Teddy signified that he did not wish known the part he had played in
saving Roy, the other agreed at once to keep the true story hidden.
“All right, I crawled ashore,” Roy said. “And if you feel like playing
doctor, go right ahead.”
He edged the pony toward Teddy and submitted to the ministrations of
his brother. When the large handkerchief had been tied about the cut, Teddy
removed his hat and placed it lightly on his brother’s head. Roy’s own hat
was floating somewhere in Rocky Run River.
“It won’t hurt you with that bandage on,” he declared. “And this sun is
pretty strong. No, leave it tilted that way.”
“Yes, doctor,” Roy replied meekly. “Anything you say. Now they’ll think
I’m a gunman.”
“You look like a pirate,” Teddy laughed. “How does that bronc ride,
Roy?”
“Pretty steady. Shakes now and then, that’s all. Jiminy! I didn’t notice
that long scratch on Star’s hind leg.” He glanced down at the pony Teddy
was leading. “Let me take him for a while.”
“No, you’ve got enough to attend to,” Teddy insisted. “Star’s all right.
Needs a good rubdown, that’s all, and he’ll soon get it. We’ll be at the ranch
in fifteen minutes.”
“Meantime—” Roy pulled his pony to a halt and began searching
through his pockets.
“Money?” Teddy asked. “Forget it. If you had any in your pockets, it’s
gone. Besides, what can you buy for eleven cents?”
“Not money,” Roy replied. “It’s—ah, here we have it!” He pulled a
sodden mass from one of his pockets. The gleam of tinfoil showed as he
held the object proudly up.
“For the love of Pete, what’s that?” Teddy gasped. “A first-aid kit?”
“Chocolate!” Roy exclaimed. “Real, honest-to-goodness chocolate—
even if it is a little mildewed. Here, take a piece.”
“Not me,” Teddy said firmly. “I like my chocolate in a cup or dry—but
not half and half. You go ahead and eat it.”
“I will,” Roy answered, munching on the candy. “It’s good, too.”
“Is it?” Teddy commented. “Well, that’s nice.”
He could think of nothing else to say, and the two boys rode for a while
in silence. The chocolate gave Roy added strength, and gradually his cheeks
were resuming their normal color, that peculiar reddish brown that comes to
the faces of men who live in the open. There is nothing more sickly looking
than to see a man whose skin is tanned go suddenly pale beneath it.
“You know,” Roy said after a few minutes, “I would have been after this
bronco as quickly as you, only my stirrup slipped.”
“I thought something happened. I—er—thought I had him when he
doubled back and got away again. Hope Nell didn’t get hurt when she fell
off.”
“She didn’t,” Roy assured him. “Wanted to know if I thought she was a
bag of potatoes when I suggested that Belle and Ethel carry her in. Or
maybe I did say cart her in.”
“You probably did. From a youth you were given to the use of the
correct expression in the incorrect place.”
Another period of silence. Then, from Teddy:
“Well, I’m glad of that.”
“Huh?”
“That she didn’t get hurt when she fell off. Just continuing the
conversation. How’s your head feel now?”
“Is by me Ho Kay! Such is the resilience of youth that—”
“Applesauce! Snakes, it’s getting hotter by the minute! I’m nearly dry.
And that reminds me—”
“Yes, I thought of that, too,” Roy said meaningly. “How’d you get wet
watching me swim to shore?”
“Well, I waded in and helped you, then. That’ll pass.”
Both Roy and Teddy knew the real reason for not saying anything about
the rescue. In the first place, Nell Willis would berate herself for having
fallen off, and so, consequently, having exposed Roy to danger. In the
second place—and this Teddy realized more than Roy—there would be
small glory to Roy in having to be dragged from the river. And after all, it
was Teddy’s fault, for his cry startled the runaway. For these and other
reasons the boys judged it best that none but themselves should know the
true story.
Ahead of them now was the hill that over-topped the 8 X 8 ranch. Within
ten minutes they would be greeting the girls.
Suddenly Teddy, who was ahead leading Star, held up his hand.
“Got a question to ask?” Roy said laconically. “Well, go ahead. But
remember teacher isn’t here to—”
“I heard a yell,” Teddy interrupted shortly. “A funny yell.”
“A funny yell?” Roy noticed the seriousness of his brother’s face and did
not carry the joking further. “What do you mean?”
“Well, it sounded like a yell for help. Pipe down a second while I listen.”
The horses were brought to a halt. The boys remained silent, but heard
nothing but the murmur of the river in the distance.
“Reckon I was mistaken,” Teddy said finally. “I must be hearing things.
What say we get a wiggle on? You feel all right?”
“Sure! Step on it. Don’t worry about me. That chocolate brought me
around.”
They swung their mounts into a trot. Both Star and Flash were well
schooled, and could trot as well as any Eastern pony. Nearly all Western
steeds will go right from a walk into a gallop, since there are few times
when a trot is demanded of them. The Western stirrup is usually too long to
allow “posting,” which is the peculiar rising and falling of the rider to co-
ordinate with the pony’s motion.
At the foot of the hill was a small clump of trees, the only shade visible
for miles around. Teddy headed for this.
“Any special reason?” Roy inquired.
“For going this way? Well, it’s no longer, and that yell—if it was a yell
—came from this direction. We might take a look—see?”
“Check! We shall investigate the ghostly sound.”
The boys were intent on this new experience now. The fall into the river
was forgotten for the moment. Roy scarcely realized that his head was
injured, yet was forcibly reminded of the fact when he took off his hat to
rub an itchy place.
“Man’s yell?” Roy asked after an interval. They were approaching the
trees.
“I thought so. Not shrill enough for a woman or a girl. And it couldn’t
have been a cat.” Teddy was referring to a mountain lion, not a house cat.
Coming into the shadow of the trees, Teddy halted again, as a man does
who is uncertain of things around him. The woods were about a quarter of a
mile deep, tapering off at one end like a triangle.
“Going to ride through?” Roy asked.
“Might as well.” He urged Flash forward. “Maybe—”
The sentence was never finished. So close to them that they started
violently, as did their horses, came a cry:
“Don’t! For heaven’s sake, don’t shoot! I haven’t got it with me, I tell
you! I—”
The roar of a gun cut the voice short. It died out in a groan. From the
point of the triangle two men rushed into the open—two men, riding hard
and leading a third horse.
CHAPTER IV

The Old Miner


A boxer who has trained his muscles to react automatically and to dodge
a blow from an antagonist almost before it has started, does not consciously
order his knees to bend or his body to shift. Those things happen without
deliberate volition, simply because the habit has been formed. Thus, when
Teddy and Roy heard that shot, they crouched low in their saddles and
jumped their mounts forward without the loss of a second. It was Star’s
bridle pulling him that caused Teddy to hesitate and to give thought to the
best procedure.
Roy flashed ahead, intent on the pursuit of the men who, undoubtedly,
had been engaged in the commission of something they wanted to keep
hidden.
He was actually gaining on them when he heard his brother shout:
“Roy! Come back here! Here’s a man dying!”
Roy pulled up his pony. The two men gave a quick glance to the rear and
swung to the right, mounting the hill. They evidently thought the chase had
been abandoned.
“Never mind about them, Roy! I need help here!”
Roy yanked the bronco’s head in the air and turned him as on a pivot. He
could hear his brother, but could not see him.
“Where are you?”
The question remained unanswered, for at that moment Roy reached the
edge of the trees and saw Teddy.
The boy had dismounted and was leaning over a figure stretched out
under a pine tree. The two ponies stood near by.
“Right, Teddy! Be with you in a second.”
Roy slid from the pony before it had come to a full stop. Then he was at
his brother’s side and staring down at the body of a man—a miner, from his
clothes—who lay breathing noisily, a thin trickle of blood running from his
neck and spreading over the blue denim shirt.
“Got it good,” Teddy whispered. “Afraid he’s going to pass out pretty
soon.”
The man was past fifty, from his grey hair, and nearly sixty from the
lines creased deeply in his face. His eyes were sunken, the cheeks hollow,
betokening much hardship. About six feet tall he was, with long arms that
now lay like rods of flesh at his sides. The fingers opened and closed
convulsively, then quieted.
As Roy bent toward him, he thought how much this unfortunate
reminded him of Pop Burns, an old hand on the X Bar X. Tall, thin,
grizzled, same facial characteristics, same broad forehead and large ears.
“Enough to be his brother,” Roy muttered.
Teddy nodded, understanding the remark.
“Does look like Pop,” he said in a low voice. “Gosh, he’s bleeding.”
Roy tore the handkerchief from his head and, using another and smaller
one for a pad, he bound up the wound. Unskilled as the boys were in
matters pertaining to surgery, they saw that the jugular vein was not
severed, but that the blood came from smaller vessels beneath the skin.
“He’s got a chance if we can stop the bleeding,” Roy declared. “I wonder
why—”
The man groaned and opened his eyes. They stared up at the two boys
unseeing, and after a moment closed again.
“Wants to say something,” Teddy muttered. “Lie still, sir. You’ll be all
right. Just lie still.”
Roy shook his head. The man’s face was growing greyer every second.
“We’ve got to get him out of here! Teddy, there’s only one thing to do.
You ride like the mischief for the ranch and get Mr. Ball or somebody to
bring a car. See if you can bring some aromatic spirits of ammonia. I’ll wait
here.”
“Right!” Teddy wasted no words, but swung himself into the saddle.
“Suppose they come back?” he called suddenly, as Flash started.
“Go on!” Roy yelled. “I can take care of myself!”
Teddy raised his elbows and Flash galloped away. In a moment horse
and rider were out of sight.
Roy sat down on the ground beside the man, stretched his left leg out,
and carefully raised the man’s head. Using his leg as a cushion, he managed
to elevate the head and shoulders, so that the flow of blood somewhat
diminished. As he did so, he noticed that there was no gun in the holster
that lay by the man’s side.
“Murderers!” he muttered viciously. “Took his gun away and then shot
him. Fine bunch! Something tells me we’re going to have a look for the
boys who did this job. I think I’d recognize ’em if I saw ’em again.”
He touched the bandage lightly and observed that the bleeding had
almost stopped. There was a dark stain on his leather chaps and on the
ground near the man’s head.
“Lost plenty. They sure tried their best to finish him. They took his
bronc, too. Maybe they had it in for him. Looks like a miner to me. Poor old
geezer!”
He was talking aloud without realizing it, and, of a sudden, the man’s
lips began to move. Roy bent closer.
“Take it easy, old boy,” he said soothingly. “Don’t try to talk. We’ll soon
have you fixed up.”
“Did they—did they—”
The voice was scarcely more than a whisper.
“Everything’s all right,” Roy insisted. “Don’t worry. You’ll have plenty
of time to talk later. Just lie still now.”
“—get it?” The lips moved, then were quiet.
Roy thought the man had lapsed into unconsciousness again, but the
nostrils were twitching.
“They didn’t get anything,” the boy said stoutly. “And we’ll get them,
too, as soon as you’re fixed up!” A quick suspicion flashed through his
mind. This was a robbery. The man had been carrying a sum of money and
had been waylaid and robbed. Little as he knew about the case, Roy
realized that the thing to do was to relieve the man’s mind as much as
possible.
“It’s safe,” he said, talking as he would to a child. “They didn’t get it.
Forget about that. It’s all right—all right.”
“I’m—I’m thankful!”
The whole body seemed to relax still more and the chest rose and fell
with better regularity. Roy looked swiftly about him.
“Teddy ought to be back any minute,” he said to himself. “Maybe I’m
lying to this fellow, but it’s for the best. He won’t have a show if he starts to
fret about what he lost.”
The minutes passed. Roy’s leg stiffened and a painful cramp seized his
thigh. But he moved it not an inch. The least motion might start the
bleeding again, and the longer the flow of blood was arrested, the better
chance the man had for recovery.
Finally, after what seemed weeks of waiting, Roy heard the exhaust of a
car and a screeching of brakes as it came to a stop just outside the fringe of
trees. A man came running toward him.
“Bug Eye!” Roy called softly. He held up his hand. “Take it mighty
easy,” he said. “The bleeding’s stopped. We don’t want to start it again.”
“Who is he? What happened? Snakes, he sure looks done in!” Bug Eye,
a puncher on the 8 X 8, bent over solicitously, a look of awe on his face.
Bug Eye was young and impressionable. Every emotion showed plainly on
his frank features.
“Don’t know,” Roy answered. He glanced toward his brother, who, at
that moment, came upon the scene.
“Couldn’t find Mr. Ball. Got Bug Eye and a car as soon as I could,”
Teddy explained. “Told Curly to see that a bed was fixed up. They’ve
already telephoned for a doctor. Nell thought it was you, at first—had an
awful time convincing her it wasn’t. She wanted to come with us. Say,
what’s the orders? Are we—”
“Have to get him to the car,” Roy said swiftly. “One of you hold his head
and shoulders while I get from under.”
Bug Eye placed his arms about the man’s body and held him while Roy
removed his leg. The circulation had stopped, and when he tried to step
forward he would have toppled over had not Teddy caught him.
“Asleep,” Roy declared, slapping and pinching the leg. “Be all right in a
second. Now!” He straightened. “This isn’t going to be any cinch, Teddy.
Bug Eye, you kneel down and get your arms under his legs. Teddy, you get
next to Bug Eye, and support his back. I’ll watch his head. Careful, now!
Easy!”
Inch by inch they raised the unconscious man, and then walked with him
toward the car slowly, for the least jar might start a hemorrhage.
“Who shot him?” Bug Eye whispered.
“Don’t know who they were. I saw ’em, though.” Roy stopped and
frowned for silence. He did not want the man to hear what really had
happened, in case he were able to listen.
The auto Teddy had brought was a touring car with a large rear seat. The
top was down.
“Good,” Roy said, as he saw it. “In the back with him. You go first, Bug
Eye, then get out the other door. That’s it.”
They lifted the man and, under Roy’s direction, succeeded in placing
him on the rear seat, Teddy still holding his body and Roy his head. Bug
Eye released his hold on the legs and slid out the opposite door.
“I’ll tie the broncs to the back,” Bug Eye stated. “They can easy follow
at the speed I’ll be goin’.”
So intense was the moment that the puncher neither noticed the cut on
Roy’s head nor the condition of Star. He fastened the ponies to the top
supports, and then got behind the wheel.
“As easy as you know how, Bug Eye,” Teddy cautioned. “Watch for
every bump and slow down. All right. Let’s go!”
The starter whirred, the motor awoke, and the car began to move. Roy
studied the man’s face anxiously. He and Teddy tried to hold the body so
that it was absolutely immovable, but that was impossible. The plains are
vastly different from a macadamized road. Try as they would, the boys
could not keep the man from shifting a little.
The right arm moved and the hand clutched at the pocket.
“What’s he want?” Teddy whispered.
Roy did not answer. When the man lay quiet again, he touched his side
lightly. The pocket was empty. As he held him, Roy could feel that there
was nothing resembling a bag of money or gold about his person. The
trousers were of khaki, and, unlike the trousers of a cow puncher, fitted
tightly.
Roy looked at his brother and his lips formed the words:
“Whatever he had is gone, Teddy.”
He hesitated a moment. The man was limp, obviously unconscious.
There was no danger of his hearing now.
“He’s been robbed,” Roy said.
CHAPTER V

Belle Ada’s Nerve


“Then—” Teddy Manley began, and stopped. “I see,” he said after a
minute. “They plugged him, robbed him, and took his bronc.” His voice
was low—bitter. “The spirit of the West! Romance! Well, we can do very
well without that. Blamed cowards!” He clenched his fist. “Why couldn’t
they take his money and call it a day? What did they have to—murder—
him for?”
Roy placed a hand on his brother’s arm.
“Take it easy, boy,” he said slowly. “Talking won’t do a bit of good.
We’ll have to wait and hear his story. Then, perhaps—”
The fire gradually died out of Teddy’s eyes. He realized that his brother
was right, that it would do no bit of good to avenge the wounded man
mentally. There would be time to take up the chase of the highwaymen after
their charge was delivered into the hands of a doctor.
They reached the 8 X 8 without the man regaining consciousness. Mrs.
Ball, a motherly woman who had within her the courage of the plains, was
waiting for them at the door of the ranch house. She hurried forward as she
saw the car pull into the yard.
“Where is he?” she exclaimed, although she plainly observed the figure
in the rear. “Now, then—”
Bug Eye brought the car to a stop and Mrs. Ball fairly leaped to the
running board.
“The poor soul! The poor soul! The doctor will be here any minute. I
sent the girls upstairs and told them to stay there. This is no sight for them.
Bug Eye, you take them horses to the back. All right, boys, bring him into
the front room. I fixed the cot.” She looked again at the sunken cheeks of
the old man. “Ah, the poor soul!” she muttered. “He’s going to have a bad
time of it!”
Carefully the Manley boys lifted the sufferer out and bore him into the
house. Nell and Ethel, wide-eyed, were leaning over the banisters. Belle
Ada was sitting composedly on the top step. She saw Roy, and noticed the
cut on his forehead.
“I’m going down,” she announced definitely. Wisely, she said nothing to
the others of her brother’s injury. “You two stay here. No use crowding
around him.”
Nell nodded, rather white of face. She had no wish to view the
proceedings from a closer point.
Belle walked down the stairs calmly and when the man had been laid on
the cot she approached Roy.
“What happened to you?” she asked in a low voice.
He turned swiftly.
“Nothing of any account, Sis,” he answered. “Tell you later. I got hurt a
little trying to catch Nell’s bronc. Say, you’d better get some water boiling.”
Belle started toward the kitchen without a word. She was not unused to
emergencies.
Mrs. Ball was doing all in her power to make the man comfortable. As
the two boys stood there, contemplating the figure on the cot, the front door
opened and the doctor entered, followed by Mr. Ball.
One glance Peter Ball took at the wounded man.
“Stranger,” he said briefly. “Miner, from his clothes. All right, doc, he’s
yours. We’re waitin’.”
The doctor, a young chap but newly arrived in that section, seemed a
trifle nervous. He set his bag on the floor and opened it. The moment he
started to work, however, his nervousness disappeared. His entire thought
was concentrated on the case before him.
“Boiling water,” he said sharply. “Where is it? Should have been ready!”
“It is,” a girl’s voice replied. “Here.”
Belle handed him a kettle and placed a basin at his side. Strangely
enough, although the young doctor had scarcely looked at the others in the
room, he glanced swiftly up at Belle and smiled.
“Thanks,” he said. “I didn’t mean to speak shortly. But I’ve got to work
fast.”
The bandage about the man’s neck was removed and a thick stream of
blood welled out. Mrs. Ball grew white, and leaned against her husband.
“I guess—after all—” she faltered.
“Out you go, honey, with me,” Peter Ball said simply. “This ain’t for
you. There’s enough in here as it is.” He led her to the stairs and up.
The doctor looked swiftly about him. “I need some one—” he began,
and fixed his gaze on Belle.
“Could I?” she asked eagerly. “I’m not afraid, you know.”
“I know you’re not,” was the quiet reply. “Now, boys, if you’ll just leave
us alone for a while—I could work better. Mind?”
“Sure not!” Teddy answered heartily. He watched his sister for a
moment, then turned to Roy. “Let’s go,” he said softly. “Belle is all right.”
They walked across the room and out of the door. Bug Eye was leaning
against the railing, his eyes wide with anticipation.
“How is he? Find out who he was? Is he hurt bad? How much was he
robbed of? Say, I bet—”
“Get a cinch-strap on that tongue of yours,” Roy said calmly. “Feels like
a wind coming up.”
“Aw, but listen,” the puncher protested. “I want to know—”
“So do we,” Teddy interrupted. “But we don’t, yet. The doc’s in there
fixing him up. By the way, Roy, when he comes out—” Teddy nodded
significantly.
“Forget it!” his brother exclaimed. “You mean this scratch? I can’t tell
it’s there.”
“Say, jingo, I never noticed that!” Bug Eye declared excitedly. “They get
you too, Roy?” The puncher at this moment resembled a small boy who has
just seen a circus wagon tip over. “When did that happen? The blamed
polecats! Well, scorch my pants—”
“Switch over—you’re on the wrong track,” Roy said, with a grin. “This
has got nothing to do with—him.” He jerked an expressive thumb. “I fell
into the river and struck a rock. Teddy helped pull me out. That’s why we’re
both rather damp. That’s all!”
“Oh,” said Bug Eye weakly. “I see.”
“Well, you old galoot!” Teddy cried. “I actually believe you’re
disappointed! I bet you’d rather have him shot, wouldn’t you? Say, you
have a fine nerve!”
“That ain’t so!” Bug Eye protested. “I thought maybe—”
“I know. I was only kidding,” Teddy said in a lower voice. “But we have
other things to worry about now. I’d like to find out how much he was
robbed of, if he was robbed.” He walked toward the corral, a little distance
from the ranch house. “Let’s sit,” he suggested, and climbed to the top rail.
Roy and Bug Eye followed Teddy’s example.
“Say, one of the boys is fixin’ your bronc up,” Bug Eye said suddenly.
“He’s got quite a few scratches, Roy.”
“I’m going to have a look,” the boy said quickly. “Be back soon.” He
jumped to the ground.
Teddy and Bug Eye watched him go.
“He’ll go an’ do the very same thing to Star that Jules Kolto just did,”
Bug Eye said musingly. “Sure loves that bronc. Well, Teddy?”
“You want the story?” Teddy answered, grinning. “It isn’t very long. Roy
and I were coming in from capturing the pony that Nell got spilled from. As
we were passing those woods, we heard a yell. Then a shot. Then we found
him. The rest you know.” He said nothing about his rescue of Roy,
believing, and rightly, that Bug Eye was too excited over the wounded man
to make any inquiries.
“Say, you think he’s gonna cash in?” the puncher demanded.
Teddy shook his head.
“Can’t say. I sure hope not. But he’s got a mighty bad wound—right
through the neck. How the bullet missed the jugular vein I don’t see. He
sure had Providence looking after him.”
“Old guy, ain’t he? Looks like a miner. Think he’s any relation to Pop
Burns?”
“Oh, you noticed it too, did you? He certainly looks enough like him to
be his brother. Wonder what his name is?”
“Maybe we’ll never know that.” Bug Eye kicked somberly at a lower
rail. “It’ll be bad business if he cashes in his checks.”
“Forget that kind of talk,” Teddy said sharply. “I have an idea that he’ll
pull through.” He hesitated a moment. “Say, what’s the doc’s name?”
“Ring, I think. Don’t know his first name. Seems like a good feller.”
“He does, for a fact.” Teddy examined his thumb carefully. “Hope Belle
won’t get sick, helping him. She’s not so old to be doing that sort of thing.”
“Belle is plenty there,” Bug Eye exclaimed decidedly, if not too clearly.
“She won’t welsh.”
“Anyhow, I’ll take a look and see,” Teddy said suddenly. “I think it
would be all right to go in now.”
He and Bug Eye climbed to the ground and started for the house. As they
neared the entrance, Belle appeared at the door. Her cheeks were a little
pale, but, otherwise, she was perfectly composed.
“He’s conscious,” she said clearly. “And Doctor Ring says he has a good
chance. Where’s Roy?”
“Looking after Star. How do you feel, Belle? Did you—”
She shook her head.
“Didn’t bother me in the least. I’m thirteen, you know—almost fourteen.
Say, Teddy, you and Roy are wanted inside.” She held the door open. “The
man who was hurt has been asking for you.”
CHAPTER VI

Stolen Nuggets
Teddy Manley, lines of anxiety in his face, went into the parlor. The
doctor saw him and motioned him to one side.
“Listen, Teddy,” he said quickly; “the way things look now, he’s got a
chance—a slim one, but a chance. Whoever put that bandage around his
neck probably saved his life. But he’s worrying about something—wouldn’t
tell me what it was. We can’t have that. He needs everything in his favor if
he’s to pull through. Understand?”
Teddy looked at the physician.
“It’s this way, doc,” he answered in a low voice. “He’s been robbed.
Now, suppose he asks me where his money—or whatever he had with him
—is? What’ll I say?”
Doctor Ring thought for a moment. The man’s face was turned to the
wall.
“Tell him the truth,” the doctor said suddenly. “We can’t lie, although if
it meant saving a patient’s life I’d lie like Ananias. But he’ll ask to see the
money if we tell it’s been saved. We can’t take a chance on that. Tell him
the truth.”
“Right.”
Teddy went slowly toward the cot. As the man heard him coming, he
turned his whole body and stared at the boy. The neck was swathed in
heavy gauze, making it impossible for him to move his head.
“Well, sir,” Teddy called cheerfully, “how are things?”
The bloodless lips moved and a disappointed look came into the eyes.
“That’s not the one,” the man whispered. “He looks like him, but he
ain’t. I want—” His breath caught, and he stopped, his bony hands
clenching.
“Where’s Roy?” Belle asked quickly. She was standing beside Teddy.
“Can’t somebody get him?”
But there was no need for that. The screen door whined and Roy entered.
As the man on the cot saw him, his face lighted up.
“Come here,” he whispered weakly. “I want to—ask—”
Roy glanced toward the doctor for directions, and received a nod. He
went to the side of the man.
“I’m glad to see you’re better,” he said simply. “What was it that you
wanted to ask me?”
The man’s hand tapped the coverlet impatiently.
“That’s right,” he breathed. “You’re the—one. Listen, boy—listen—” He
raised up on one elbow, and the doctor crossed swiftly to him.
“None of that,” he said sternly. “You promised to keep quiet if I let you
see him. Lie back, now.”
“Right—you’re the doctor.” A mirthless grin twisted the thin lips. “I’ll
be good. Listen, boy!” He took a deep breath. “Where’s my nugget?”
“Nugget!” Roy started back. “Is that what you—what nugget?” he asked
blankly.
“My nugget! My nugget! The one I worked for, slaved for, fought for!
Where is it?” The eyes were burning.
“I’m afraid—” Roy hesitated. “Say, what’s your name?”
“Decker. Jerry Decker. I’m a miner. I had a nugget with me that was
worth—” He stopped. “Some smaller ones, too,” he continued in a toneless
voice. The excitement seemed to drain his strength. “My nuggets—where
are they?” he finished faintly.
Roy glanced down at him pityingly.
“Mr. Decker, your nuggets are gone,” he said slowly. “You’ve been
robbed.”
“Robbed!” The word was wrung from him. “Robbed! The nuggets I
worked for—slaved for! Worth—”
His eyes opened wide, his whole body tensed. Then, with a sigh, he
relaxed. The eyes closed. The corners of the mouth went down.
“Watch it,” came a voice behind Roy. It was the doctor. “Get his arm out
from under that blanket—quick!”
Roy, understanding, did as he was told. There was a swift jab of a
hypodermic needle. In a moment the breathing resumed, the pulse fluttered.
Doctor Ring watched the face anxiously.
“I was afraid of that,” he said softly. “It was too much for him.” There
was a moment’s silence. Then the lips moved again, and a faint flush of
color came to the cheeks.
The doctor gave a “whew!” of relief.
“He’ll come out of it now,” he said finally. “It’s better to have it over
with. Besides, he may have needed just that stimulus to help him fight. Now
he’ll get well just to recover his nuggets.” His tone was hopeful. Plainly he
had been in doubt as to whether or not he had done the right thing in letting
Roy see and talk to the patient.
Roy walked to the other side of the room after giving one more glance at
the unconscious man. At that moment Mr. Ball descended the stairs.
“How’s he comin’?” he whispered. “Any better?”
The doctor nodded.
“I think so,” he replied. “I’ll have to stay here for a while yet.”
“All right,” Peter Ball remarked. “I sure hope he makes out. What
happened to him? Miner, ain’t he?”
Mr. Ball, Teddy, and Roy went into the yard. Bug Eye was waiting for
them.
“He’s a miner, and he’s been robbed,” Roy declared. “Name’s Jerry
Decker.”
“Robbed! Jumpin’ catamounts! What’s he been robbed of?”
“Nuggets, he says,” Teddy replied. “He was just going to tell us how
much they were worth when he went off again. Wonder where he was
mining.”
“The most likely place would be Nugget Camp,” Mr. Ball said. “They
been placerin’ around there for the last ten years, but I never heard tell of
anybody gettin’ rich from it.”
“Nugget Camp!” Bug Eye burst out. “I know where that is, boss! Say, I
heard tell around town of a strike bein’ made there. But nobody seemed to
know who made it. Nugget Camp, hey? So that’s where he come from!”
“Well, I’m only guessin’,” Mr. Ball admitted. “But that’s the only minin’
place anywheres near here.”
“That’s where he came from, all right,” Teddy asserted. “He must have
been on his way to town when he got shot up and robbed.” He stopped, and
looked over at Mr. Ball. “Do you think there’s a chance—” he began.
“We’ll try it,” the rancher interrupted quickly, sensing what Teddy
meant. “They’re probably out of this vicinity now, but we owe it to that
poor old geezer to have a look, anyhow. Bug Eye, get my bronc. You’re
comin’, too.”
“Sure, boss!” the puncher answered eagerly. “Right away?”
“Right away. I’ll tell my wife.” He walked swiftly toward the house.
“Looks like business,” Teddy declared. “How’d you find Star?”
“O. K. Jules Kolto fixed him up for me. He’ll be all right to ride. Take
some of the stiffness out of him. Come on, let’s get going.”
“Hey!” Mr. Ball called from the porch. Then, as he recalled the sick man
within, he motioned with his arm. When Teddy and Roy approached, he
said: “We’ll get some chuck first. Might be a long ride.”
He, Teddy, Roy, and Bug Eye ate together. In the middle of the meal Mr.
Ball saw the cut on Roy’s head, as the boy unwittingly brushed back his
hair. The rancher heard the story of the spill into the river and insisted that
Roy should see the doctor before the party started.
So with a strip of adhesive tape covering the wound, Roy mounted Star
and waited for Mr. Ball to give the signal to start. The doctor had declared
that Roy’s cut was superficial, and there would be no danger in riding.
“All set, boys?” Mr. Ball called. He had provided Teddy and Roy with
dry clothes—although their own were nearly dry by that time—and with
guns.
“All set, boss,” Bug Eye answered. “Let’s go!”
The three girls, Nell, Ethel, and Belle Ada, waved to them from the
porch.
“Good luck!” Belle called softly.
With a swirl of their hats the boys leaped their broncos forward. The
hunt was on.
They made for the clump of woods where Decker had been found.
“That’ll be a starting point, anyhow,” Mr. Ball asserted. “We may strike
something there that’ll help us. Otherwise, it’ll be like lookin’ for a needle
in a haystack.”
“Sure will,” Teddy agreed. “Baby, I’d like to come across those
waddies!”
“I’ll tell a maverick!” Roy ejaculated. “Knocking off an old man after
robbing him, then taking his bronc!”
There was little more said until they reached the woods. Roy showed just
where they had picked Decker up, and even the marks where his body had
lain, his head supported by Roy’s leg.
“We saw ’em come riding out of there,” Teddy declared, pointing to the
edge of the trees. “See—where it makes sort of a triangle?”
“Uh-huh,” Mr. Ball responded. “Which direction did they take?”
“Swung to the right. Teddy yelled at me then, and I turned back. Oh,
they’re well on their way by now.”
“Afraid so.” Mr. Ball had dismounted, and was examining the ground
intently. “Suppose you fellers get off an’ take a look around. May spot
something.”
“Clues, hey, boss?” Bug Eye cried excitedly. “Snakes!”
“Yea, clues. Make believe you’re a detective.” The rancher stood directly
on the place where Roy had told him Decker was lying. Then he faced
about.
“This way they went,” he said, more to himself than to the others. “You
can see the hoofprints of their broncos. One, two, three ponies.”
“They took his so he couldn’t follow, I reckon,” Teddy said.
Mr. Ball did not reply. He walked slowly forward.
Presently he uttered an exclamation and stopped. Then he bent to the
ground.
“What is it, boss—find somethin’?” Bug Eye asked eagerly.
Mr. Ball nodded.
“Take a look,” he said in a queer voice. “Never saw one of these out here
before.”
The others grouped about him. He held something up to them.
“Know what it is?” he said quietly.
Bug Eye shook his head. Teddy and Roy answered nothing.
“It’s a German pistol—a Mauser,” the rancher said deliberately. “One
shell has been fired.”

You might also like