(Ebook) Java Foundations: Introduction To Program Design and Data Structures (2nd Edition) by John Lewis, Peter DePasquale, Joseph Chase ISBN 9780132128810, 0132128810 PDF Download
(Ebook) Java Foundations: Introduction To Program Design and Data Structures (2nd Edition) by John Lewis, Peter DePasquale, Joseph Chase ISBN 9780132128810, 0132128810 PDF Download
https://ebooknice.com/product/java-foundations-introduction-to-program-
design-and-data-structures-5th-edition-32182666
https://ebooknice.com/product/java-foundations-introduction-to-program-
design-and-data-structures-4th-edition-37247276
https://ebooknice.com/product/biota-grow-2c-gather-2c-cook-6661374
https://ebooknice.com/product/java-software-structures-designing-and-using-
data-structures-2614256
(Ebook) Matematik 5000+ Kurs 2c Lärobok by Lena Alfredsson, Hans
Heikne, Sanna Bodemyr ISBN 9789127456600, 9127456609
https://ebooknice.com/product/matematik-5000-kurs-2c-larobok-23848312
https://ebooknice.com/product/sat-ii-success-math-1c-and-2c-2002-peterson-
s-sat-ii-success-1722018
(Ebook) Master SAT II Math 1c and 2c 4th ed (Arco Master the SAT
Subject Test: Math Levels 1 & 2) by Arco ISBN 9780768923049,
0768923042
https://ebooknice.com/product/master-sat-ii-math-1c-and-2c-4th-ed-arco-
master-the-sat-subject-test-math-levels-1-2-2326094
https://ebooknice.com/product/visual-c-2010-how-to-program-4th-
edition-1-29-pdf-31712316
Second Edition
Java ™
Foundations
Introduction to
Program Design & Data Structures
This page intentionally left blank
Second Edition
Java ™
Foundations
Introduction to
Program Design & Data Structures
John Lewis
Virginia Tech
Peter DePasquale
The College of New Jersey
Joseph Chase
Radford University
Addison-Wesley
Boston Columbus Indianapolis New York San Francisco
Upper Saddle River Amsterdam Cape Town Dubai London Madrid
Milan Munich Paris Montreal Toronto Delhi Mexico City
Sao Paulo Sydney Hong Kong Seoul Singapore Taipei Tokyo
Editor-in-Chief: Michael Hirsch
Editorial Assistant: Stephanie Sellinger
Director of Marketing: Margaret Whaples
Marketing Coordinator: Kathryn Ferranti
Managing Editor: Jeffrey Holcomb
Production Project Manager: Heather McNally
Senior Manufacturing Buyer: Carol Melville
Media Manufacturing Buyer: Ginny Michaud
Art Director: Linda Knowles
Cover Designer: Susan Paradise
Cover Art: Marc Romanelli/Getty Images
Media Project Manager: Katelyn Boller
Full-Service Project Management: Rose Kernan, Nesbitt Graphics, Inc.
Composition: Nesbitt Graphics, Inc.
Credits and acknowledgments borrowed from other sources and reproduced, with permission, in this textbook appear on
appropriate page within text.
Microsoft® and Windows® are registered trademarks of the Microsoft Corporation in the U.S.A. and other countries. Screen
shots and icons reprinted with permission from the Microsoft Corporation. This book is not sponsored or endorsed by or
affiliated with the Microsoft Corporation.
The programs and applications presented in this book have been included for their instructional value. They have been tested
with care, but are not guaranteed for any particular purpose. The publisher does not offer any warranties or representations,
nor does it accept any liabilities with respect to the programs or applications.
Copyright © 2011, 2008. Pearson Education, Inc., publishing as Addison-Wesley, 501 Boylston Street, Suite 900, Boston,
Massachusetts 02116. All rights reserved. Manufactured 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, 501 Boylston Street, Suite 900, Boston, Massachusetts 02116.
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.
ISBN-10: 0-13-212881-0
www.pearsonhighered.com ISBN-13: 978-0-13-212881-0
To my wife, Sharon, for everything.
– John
vii
viii PREFA C E
■ Two new chapters covering Hashing and Databases have been added.
■ End-of-chapter exercises and projects have been updated to reflect changes
in the book.
Regarding Objects
Phrases like objects-first, objects-early, and objects-late continue to be bandied
about by computing educators, despite the fact that the nuances of the pedagogy
of the introductory sequence cannot be summed up so easily. We’ll take this
opportunity to discuss our approach.
First, this book is purely object-oriented, presented in a gradual, natural man-
ner. Concepts that overlap with procedural programming, such as methods and
their invocation, are discussed in terms of an object-oriented approach. Thus, no
example is ever made up of a single class with multiple methods. In fact, in our
examples the class that contains the main method never contains another.
We use objects right from the start, and discuss everything in object-oriented
terms at all times. An overview of object-oriented concepts is given in Chapter 1,
then reinforced and fleshed out throughout the book. Classes from the Java stan-
dard class library are introduced immediately, and objects from these classes are
instantiated and used for the various services they provide. In the first four chap-
ters, students explore and write programs made up of a single class with a single
main method—but these programs actively use predefined classes and objects
from the standard library in addition to exploring fundamental programming
concepts such as expressions and conditionals.
We never introduce third-party classes simply as fodder to create examples.
That approach can confuse students by blurring the distinction between classes
that are part of the standard library (and thus always available) and “extras”
thrown in by textbook authors as a convenience. Every non-library class used
in an example is fully explored in this book. There’s no “magic” behind the
scenes.
The debate continues: should coverage of control structures come before the
details of writing classes, or vice versa? The truth is there are advantages either
way, and a knowledgeable instructor can capitalize on either approach. If class
composition comes first, it exposes the underlying essence of objects earlier and
demystifies their use. However, without the ability to use basic control structures,
the examples at that point are often uninteresting and unrealistic. This book
explores control structures before writing classes. Chapter 4 uses small, single-
method examples to examine the details of conditionals and loops, providing a
strong foundation for the multiclass examples in Chapter 5.
P REFA C E ix
Chapter Breakdown
Chapter 1 (Introduction) introduces the Java programming language and the
basics of program development. It contains an introduction to object-oriented
development, including an overview of concepts and terminology. This chapter
contains broad introductory material that can be covered while students become
familiar with their development environment.
Chapter 2 (Data and Expressions) explores some of the basic types of data used
in a Java program and the use of expressions to perform calculations. It discusses
the conversion of data from one type to another, and how to read input interac-
tively from the user with the help of the Scanner class.
Chapter 3 (Using Classes and Objects) explores the use of predefined classes
and the objects that can be created from them. Classes and objects are used to
manipulate character strings, produce random numbers, perform complex calcu-
lations, and format output. Packages, enumerated types, and wrapper classes are
also discussed.
Chapter 4 (Conditionals and Loops) covers the use of boolean expressions to
make decisions. All related statements for conditionals and loops are discussed,
including the enhanced version of the for loop. The Scanner class is revisited
for iterative input parsing and reading text files.
Chapter 5 (Writing Classes) explores the basic issues related to writing classes
and methods. Topics include instance data, visibility, scope, method parameters,
and return types. Constructors, method design, static data, and method overload-
ing are covered as well. Testing and debugging are now covered in this chapter as
well.
Chapter 6 (Graphical User Interfaces) is a thorough exploration of Java GUI
processing, focusing on components, events, and listeners. Many types of compo-
nents and events are discussed using numerous GUI examples. Additionally, lay-
out mangers, containment hierarchies, borders, tooltips, and mnemonics are
introduced.
Chapter 7 (Arrays) contains extensive coverage of arrays and array processing.
Topics include bounds checking, initializer lists, command-line arguments, variable-
length parameter lists, and multidimensional arrays.
Chapter 8 (Inheritance) covers class derivations and associated concepts such
as class hierarchies, overriding, and visibility. Strong emphasis is put on the proper
use of inheritance and its role in software design.
Chapter 9 (Polymorphism) explores the concept of binding and how it relates
to polymorphism. Then we examine how polymorphic references can be accom-
plished using either inheritance or interfaces. Design issues related to polymor-
phism are examined as well.
x PREFA C E
Student CD
The CD included with each textbook contains:
■ Source code for all of the programs in the text.
■ The Java Software Development Kit (SDK).
■ Various Java development environments, including NetBeans™, Eclipse™,
DrJava, jGRASP™, and TextPad®.
Instructor Resources
The following supplements are available to qualified instructors only. Visit the
Pearson Education Instructor Resource Center (www.pearsonhighered.com/irc)
or send email to [email protected] for information on how to access these
resources.
■ Presentation Slides—lecture-ready presentations for each chapter in
Microsoft PowerPoint® format.
■ Solutions—full solutions to the exercises and programming projects.
■ Test Bank with powerful test generator software—includes a wealth of
free-response, multiple-choice, and true/false questions.
Acknowledgments
Educators and students from around the world have provided feedback on previ-
ous work that has allowed us to mold this book into a fresh, valuable resource.
Your comments and questions are always welcome.
The talent and commitment of the team at Addison-Wesley continues to amaze
us. We greatly appreciate the insight of Michael Hirsch, our editor, and the hard
work of his assistant, Stephanie Sellinger. Rose Kernan at Nesbitt Graphics was a
great help throughout the production process. We thank all of these people for
ensuring that this book meets the highest quality standards.
We’d like to acknowledge the collective input from hundreds of professors and
students around the world in the development of the material upon which this
xii PR EFA C E
book is based. There are too many of you to individually name, but your influ-
ence on Java Software Solutions and Java Software Structures is evident in Java
Foundations.
Special thanks go to Ruth Dannenfelser, Cory Samaha, and Zach Zappala at
the College of New Jersey for their help with solutions to the database projects.
And our continued thanks go to Jason Snyder at Virginia Tech for his assistance
testing code and many other contributions.
Groups like the ACM Special Interest Group on Computer Science Education
(SIGCSE), the Consortium for Computing Sciences in Colleges (CCSC), and the
Computer Science Teachers Association (CSTA) are phenomenal resources. Their
conferences and online activities provide opportunities for educators from all lev-
els and all types of schools to share ideas and materials. If you are a computing
educator and are not involved with these groups, you’re missing out.
Finally, we thank our families for their support and patience during the busy
process of writing.
Contents
Preface vii
Chapter 1 Introduction 1
1.1 The Java Programming Language 2
A Java Program 3
Comments 5
Identifiers and Reserved Words 6
White Space 9
Characters 45
Booleans 47
2.4 Expressions 47
Arithmetic Operators 48
Operator Precedence 48
Increment and Decrement Operators 51
Assignment Operators 53
3.3 Packages 79
The import Declaration 80
Sliders 255
Combo Boxes 260
Timers 265
AT MILTON SCHOOL
AN INDEPENDENT PUPIL
Simon Musgrave walked away, not doubting that the two boys would
obey orders.
“What shall I do, Rawdon?” asked Vivian, in a state of nervous alarm.
“The doctor will be sure to flog me!”
“Then don’t go near him.”
“But he will come for me.”
“Then mind you are not to be found.”
“What do you mean?”
“Go to your room, get a few underclothes, and run away. Remember
where I told you to go. You know where Farmer Glover lives?”
“Yes.”
“Go there. Ask him to keep you till I come.”
“But will he?”
“I am sure he will. He hates Dr. Musgrave, who tried to cheat him out of
pay for some hay he bought of him. You’ll find him to be a good friend.”
“It seems a bold thing to do, Rawdon, but if you say I had better, I will
be guided by you.”
“That is right. Now lose no time in going to your room, and I will delay
matters so that you will have a chance to get away.”
“Shall you go to see the doctor?”
“Yes; I am not afraid of him.”
Jim Rawdon loitered about the quadrangle, and it was nearly fifteen
minutes before he presented himself near the office. Simon had been sent
out to look for him.
“Why don’t you go to my father’s office?” he demanded.
“There is no hurry,” returned Rawdon, composedly.
“You’ll find out if there isn’t. Pa’s awful mad; I can tell you that.”
“Then he’d better get over it as soon as possible. It isn’t healthy for an
old man like him to get into a rage.”
“I hope he’ll flog you!” said Simon, exasperated at Rawdon’s coolness.
“You were always kind and friendly, Simon. Just as sure as he tries to
flog me, I’ll flog you!”
“Where is Bell? Has he gone to the office?” said Simon, who felt that
Rawdon would be very likely to carry out his threat.
“What have I got to do with Bell? Isn’t he in the office now?”
“If he isn’t it’ll be worse for him. Pa isn’t in a humor to be trifled with.”
Five minutes later Jim Rawdon sauntered into the office of Dr.
Musgrave.
The doctor was sitting at his desk. His face was stern and wrathful.
“Where is Bell?” he asked, abruptly.
“I can’t tell you, sir.”
“Wasn’t he with you when my son Simon summoned you to my office?”
“Yes, sir.”
“Then how is it you don’t know where Bell is?”
“I am not his guardian, Dr. Musgrave. We separated, and I did not
trouble myself to see where he went. Hasn’t he been here?”
“No, he hasn’t,” answered the doctor, sharply. “How happens it that you
come so late?”
“Simon didn’t tell me there was any particular hurry.”
“My orders are always to be obeyed at once!”
“Very well, sir.”
“You’d better remember that next time.”
“I am here now. What did you wish to see me about?”
“I understand that you have treated my son Simon with disrespect.”
“Please be more explicit, sir,” said Rawdon, with exasperating coolness.
The doctor bit his lip. He felt that Rawdon was impertinent, though his
language was strictly respectful.
“You interfered between him and Bell.”
“I did. I saw that he was bullying Bell, and I interfered to protect Bell.”
“What business was it of yours?”
“Sir,” said Rawdon, with dignity, “I am an English boy, and I can’t stand
by and see a younger boy bullied by an older and stronger one.”
“Do you think I will allow you to interfere with my son? If you had any
complaints to make, you should have come to me.”
“There was no time for it.”
“Simon tells me that he asked Bell to go to the village on an errand for
him.”
“Bell had a headache, and was not fit to run errands.”
“You could have told me that.”
“And in the meantime Bell would have been on his way to the village.”
“Hark you, Rawdon! You are taking too much on yourself!”
Jim Rawdon made no reply.
“And if this continues I shall feel compelled to flog you!”
“I think you had better not, Dr. Musgrave,” said Rawdon, in a significant
tone.
“Why not, sir?” demanded the doctor, angrily.
“Because my father won’t permit it. He told me when I came to school
to report to him if you laid your hand on me.”
Dr. Musgrave winced. He had reason to believe that Jim told the truth,
and he knew that he was under obligations to the senior Rawdon, who
might make things uncomfortable.
“I don’t allow any outsider to interfere with my discipline,” he said, “but
I will postpone your case till I have dealt with Bell. You say you don’t know
where he is?”
“No, sir.”
“Have you any idea where he went when he left you?”
“I think he may have gone to his room.”
“Did he understand that I sent for him?”
“I presume so, Dr. Musgrave. I didn’t ask him.”
“You may go to his room and see if he is there. If so, tell him to come
here directly.”
Rawdon left the office.
Outside stood Simon Musgrave.
“Did my father flog you?” he asked, maliciously.
“You had better ask him.”
“I hope he did.”
“By the way, Simon, have you seen Bell?”
“No.”
“Your father thinks he may be in his room. Will you go and tell him, if
you find him there, that he is to go to the office?”
This was to Simon an agreeable errand, and without asking whether it
was desired by the doctor that he should go, he set off at once.
He returned in a brief space of time, saying:
“I can’t find him.”
“Then you might tell your father; or shall I do so?”
“I’ll go in.”
“I’ve been round to Bell’s room, pa,” he said, “but he isn’t there.”
“Inquire around among the boys if anyone has seen him,” answered the
doctor, frowning.
“Did you flog Rawdon?” asked Simon, eagerly.
“Not yet. Do as I told you.”
Inquiry was made among the pupils, but if anyone had seen Vivian Bell,
no one would give information on the subject.
At length an under-gardener said: “I seen him going off Bolton way. He
had a bundle under his arm. He looked like he was running away.”
“Bell running away!” exclaimed Dr. Musgrave, scandalized. “Why, he
wouldn’t dare to do such a thing!”
“You know best, sir,” said the gardener, humbly.
“If he has run away,” said Dr. Musgrave, setting his teeth, “I’ll half kill
him when I get him back!”
Jim Rawdon was summoned again.
“Rawdon,” said Dr. Musgrave, abruptly, “has Bell ever said anything to
you about running away?”
“Has he run away?” asked Rawdon, innocently, looking immensely
surprised.
“Answer my question, sir.”
“I can’t say that he has, sir, although he has complained of being badly
treated.”
“No one is badly treated here!” roared the doctor, furiously. “What do
you mean by such an insinuation?”
Jim Rawdon did not seem terrified by the doctor’s angry outburst.
“I am not saying he was ill treated,” he replied, “but——”
“Well?”
“I think he was.”
“You are the most impudent boy I have in my school! How dare you talk
in this way?”
Rawdon merely shrugged his shoulders.
Dr. Musgrave wished he might set off at once in pursuit of the missing
pupil, but he could not break away from his duties.
“I’ll go for him, pa,” volunteered Simon.
“No; I will wait till to-morrow morning, and go myself.”
“But he may get away for good and all!”
“He can’t go far, for he has no money. I am not afraid of losing him.”
CHAPTER XII
When Vivian Bell parted from Jim Rawdon he strictly followed the
directions of his schoolmate. He went hurriedly to his room, made up a
bundle of underclothing, and then crossing the grounds in nervous haste,
started on the Bolton Road.
He knew the way, for he had often gone in this direction on holidays,
usually with a company of his schoolfellows.
He had hardly time to consider the importance of the step he was taking.
He was animated by a feverish desire to get as far away as possible from the
school where he was ill treated.
He feared and detested the head master, who, to the best of his
remembrance, had never spoken a kindly word to him.
He would never of his own impulse have dared to run away, but the
stronger will of Jim Rawdon dominated him.
As he hurried along on a rustic road between two delightful hedge-rows,
he looked backward from time to time with nervous apprehension, almost
expecting to see the tall, gaunt figure of Dr. Musgrave following him in hot
pursuit, or the red head and malicious face of his young tormentor, Simon.
But when a mile away he began to feel less apprehension. He was
confident that Rawdon would somehow cover his flight and put the
pursuers off his track.
An unwonted sense of freedom came to him.
“Oh, if I could get away entirely from Dr. Musgrave!” he thought. “I
would be willing to work hard. Perhaps some farmer would engage me. I
would not mind hard work as long as I was well treated.”
It is a very serious thing when a teacher who should be the guardian and
guide of his pupils inspires dread and abhorrence. It is difficult to estimate
how much unhappiness is occasioned by such unprincipled tyrants as Dr.
Peter Musgrave, the head master of Milton School.
It seems a pity that they could not for a time change places with some of
the pupils they abuse, as is done in the ingenious story, “Vice Versa.”
Vivian had walked about two miles when he was overtaken by the
carrier in his cart.
All the boys of Milton School knew Jack Hunt, who was a good-natured
man of middle age.
“Where are you going, Master Bell?” asked the carrier, slackening his
speed.
Vivian turned round and answered: “Won’t you ever tell, Jack?”
“No, I won’t,” answered Jack, stoutly.
“Then I am running away.”
“You don’t mean it now, Master Bell?” exclaimed Jack, half incredulous.
“Yes, Jack, it’s true.”
“What! Running away from the schoolmaster?”
“Yes, Jack.”
“Then I’ll be danged if I blame thee, lad. He’s a brute, he is.”
“He’s treated me brutally, Jack.”
“But I say, Master Bell, I didn’t think thee had it in thee. Why, I didn’t
think thee had the pluck to run away.”
“I don’t think I would, Jack, if it hadn’t been for Jim Rawdon.”
“Ah, yes, Rawdon. He’s a plucky lad. He wouldn’t let the master flog
him.”
“No, I don’t think Dr. Musgrave ever flogged Rawdon.”
“But he’s flogged thee?”
“Oh, many a time,” answered Vivian, shuddering. “Oh, he has beat me
cruelly.”
“I’d like to get at him,” said Jack, shutting his teeth firmly together. “I’d
like to get at him with a horsewhip, that I would!”
“But Simon is almost as bad.”
“That’s the schoolmaster’s boy. I know that Simon. He’s got an ugly
temper, he has. And he’s impudent, too.”
“Did you ever have any trouble with him, Jack?”
The carrier laughed.
“He’s had trouble with me,” he answered. “I’ll tell you how it was. I was
drivin’ along one day, just as you see me now, when Simon came up, and,
just out of ugliness, picked up a stone and fired it at my ’orse. Well, I
wouldn’t stand that, you know, so I jumps off my cart and I ran after the
boy whip in hand.”
“Did he run away?”
“No; he stood his ground. He thought I wouldn’t dare to hit him. So
when I said: ‘Why did you go to do that?’ he answered, impudent like:
‘Because I chose.’ With that I took my whip and slashed him about the legs
till he jumped and swore.”
“You lashed Simon Musgrave?” asked Vivian, almost incredulous.
“Yes, I did. Oh, wasn’t he mad, though! He threatened that he would tell
his pa, and have me locked up.”
“I am glad to hear that. It does me good! And you really and truly lashed
Simon?”
“Ask him if I didn’t.”
“I wonder he didn’t tell the doctor.”
“I told him I would have him arrested for stoning my ’orse.”
“I would like to have been there.”
Vivian Bell was far from being a vindictive boy, but it seemed to do him
good to hear that his persistent young persecutor had for once had the same
treatment meted out to him that he had so often inflicted upon others.
“Where are you going, Master Bell?” asked the carrier, with a sudden
thought.
“Rawdon told me I’d better go to Farmer Glover’s, and ask him to take
me in over-night.”
“And a good plan it is; but you’re only half way to Giles Glover’s.”
“I’m not tired, Jack. I shall be able to walk.”
“There’s no need of walking. I’m going all the way there myself. So just
jump up into my cart, Master Bell, and I’ll have you there in a jiffy.”
Vivian was glad to accept this offer, and in a minute he was in the cart,
riding beside Jack, the carrier.
“I am afraid I will get you into trouble, Jack,” said Vivian, after a pause.
“Never you think of that, Master Bell. You don’t think the doctor’ll be
flogging me, do you, now?” asked the carrier, with a broad grin.
“No; I don’t think he would do that.”
“I would like to see him try it, I would.”
“But he might refuse to employ you.”
“As I am the only carrier hereabouts he wouldn’t do that.”
“Well, you are very kind, Jack.”
“And why wouldn’t I be? I’d help any of the schoolboys. There’s one
thing I’d like to help them in.”
“And what’s that?”
“To flog the schoolmaster. That would be rare fun.”
So Vivian Bell and his good friend the carrier sped along till they came
in sight of the farmhouse occupied by Giles Glover.
It so happened that the farmer himself was out in the yard when the
carrier drove up.
They greeted each other like old friends.
“And whom have you got with you, Jack?” asked the farmer.
“I’ve got a boarder for you, farmer.”
“I don’t understand. Isn’t this one of Dr. Musgrave’s boys?”
“Yes; and he’s run away from school.”
“You don’t say! And what for?”
“Because the doctor has been flogging him almost every day, till he’s
tired of it. Will you take him in for a night?”
“Aye, that I will! But what are you going to do, lad?”
“I will wait here till Jim Rawdon comes. He will advise me.”
“Aye! I know Rawdon. He is a manly boy, Rawdon is.”
“It was he that advised me to run away.”
“But have you any money, lad? You know you can’t get along without
money.”
“Yes, I have a little money. I will pay you for taking me in.”
“No, you won’t, lad! Giles Glover wants no pay from a poor, persecuted
lad. There’s plenty to eat here, and you’re heartily welcome to it. But have
you nothing to live on? Where is your father, lad?”
“I have no father nor mother.”
“Then who pays your bills?”
“My guardian.”
“Then why don’t you go to him?”
“I can’t. He lives in Bombay. That’s ever so many thousands of miles
off. I have written to him, and I hoped to hear from him before this time.”
“Wouldn’t it have been better to wait?”
“I couldn’t,” said Vivian, wearily. “It is four months since I wrote.”
“But how will you get along?”
“If I can get to London I will go to my guardian’s bankers.”
“Well, I will keep thee at any rate for a night or two, and it sha’n’t cost
thee a penny.”
Soon after Vivian’s arrival he sat down to a plentiful supper. He ate
heartily, and his courage rose. He was surrounded by humble but cordial
friends, and the atmosphere of kindness was as grateful as it was new to
him.
But it would not be long before his place of concealment would be
discovered, and his foes be on his track.
CHAPTER XIII
It so happened, though Vivian did not know it, that he was seen riding
with Jack the carrier by a boy named Jarvis, connected with Milton School.
Jarvis was a toady to Simon, and strove to ingratiate himself with Dr.
Musgrave by carrying him tales of his schoolmates.
Hidden behind the shrubbery, Jarvis saw the carrier’s cart with Bell as
passenger.
He had been to Bolton to call on an aunt.
On his return to the school he heard of Vivian Bell’s disappearance.
Jarvis congratulated himself on being the first to carry news of his
missing scholar to the head master.
In crossing the campus he fell in with Simon.
“What’s the news, Simon?” he asked.
“Bell has run away!”
“Do you know where he has gone?”
“No; but pa’ll catch him, I’m sure of that. I wouldn’t like to be in his
shoes then, I can tell you!”
“Didn’t anybody see him go?”
“No; I had just told him pa wanted to see him in the office, and I
supposed he would report there. I’ll tell you who knows something about
his going away.”
“Who is it?”
“Rawdon. He was with him, and I feel sure that he put Bell up to running
away.”
“Very likely. Bell’s a milk-and-water chap. He wouldn’t dare to run
away unless someone put him up to it. Have you any idea in what direction
he went?”
“No.”
“Humph!”
“What do you mean by your mysterious manner. Do you know anything
about his going away?”
“Well, I might have found out something,” answered Jarvis.
“If you know anything it’s your duty to tell me right off,” said Simon,
imperiously.
Jarvis, in general, acquiesced in anything that Simon said, but he was
aware of the importance of the information he had to offer, and chose to get
all the credit himself.
“Why is it my duty to tell you?” he asked.
“So that I may tell pa.”
“It will do just as well if I tell him.”
“No, it won’t. You tell me, and I will go to the office at once and tell pa.”
“There is no need to trouble you, Simon. Whatever there is to tell I can
tell myself.”
“I don’t believe you’ve got anything to tell,” said Simon, cunningly.
“Nothing much, only that I saw Bell when he was running away.”
“Where did you see him?” asked Simon, eagerly.
“That’s what I am ready to tell your father.”
Simon made another attempt to obtain the information, but failing, he
escorted Jarvis to the office of Dr. Musgrave.
“Pa,” he said, bustling in, “there’s some news of Bell.”
“What is it?” asked the master, looking up from the desk.
“Jarvis saw him running away.”
Jarvis, who had followed Simon into the office, now pressed forward.
“Well, Jarvis, what have you to tell?” asked the doctor.
“This afternoon I saw Bell riding over the Bolton Road with Jack Hunt,
the carrier.”
“Ha! that man is in it! I am not surprised. His influence over my pupils is
very demoralizing. He will get into trouble if he is not very careful.”
“Can’t you have him arrested, pa?” said Simon, who had a grievance of
his own against the independent carrier.
“That depends on his connection with the affair. In what direction was
the carrier going?”
“Toward Bolton, sir.”
“Did he or Bell see you?”
“No, sir. I was hiding behind the hedge.”
“What else did you see?”
“Bell had a bundle with him.”
“Ha! a bundle of clothes, no doubt! What time was this?”
Jarvis mentioned the hour.
“He must have started about the time I told him to go to your office, pa.”
“Probably. Simon, do you know where the carrier lives?”
“Yes, pa.”
“What time does he get back from Bolton?”
“About six o’clock.”
“Very well; go there at that time and ask him to step around to see me.”
“All right, pa.”
This was an errand which Simon enjoyed. He reached the carrier’s house
just as Jack was unharnessing his horse.
“I say, Jack,” he began, “pa wants to see you right off.”
“Does he?” returned the carrier. “You can tell him where I am. If he will
come round here he can see me.”
“He wants to see you at his office.”
“Well, I haven’t time to go there. My supper is waiting for me. Do you
know what he wants to see me about?”
“Yes; it’s about Bell. He was seen riding with you this afternoon.”
“Oh, he was, was he? Did you see him riding with me?”
“No, but Jarvis did; so there’s no use of your denying it.”
“I don’t deny it. Master Bell is always welcome to ride with me, but I
wouldn’t take you on my cart, nor yet that Jarvis.”
“I say, you’d better be careful. Pa ain’t going to have you help his boys
run away.”
“Who’s run away?” asked Jack, innocently.
“Why, Bell, of course. You don’t mean to say you didn’t know it?”
“Master Bell run away! You don’t mean it! Why should he run away
from such a kind man as your father?”
“Because he was a bad boy. He always disobeyed the rules,” said Simon,
sharply.
“You don’t mean to tell me so! And I thought he was such a good, quiet
boy.”
“Where did you leave him?”
“Where did I leave him? I didn’t leave him anywhere. He left me.”
“Where was it?”
“On the road.”
“Did he tell you where he expected to spend the night?”
“He might, and again he mightn’t. I am so forgetful that I never minds
what’s told me. It just goes into one ear and out of the other.”
Finding he could get no certain information out of the carrier, Simon
started to go, threatening him with arrest for conniving at the escape of
Vivian Bell.
“You don’t really think your pa would have me arrested, do you,
Simon?” asked the carrier, pretending to be very much frightened.
“You just see!”
“You’ll speak a good word for me, won’t you? You see it would be bad
for my business to be arrested.”
“You ought to have thought of that,” said Simon, under the impression
that Jack was weakening. “Your only course is to tell pa all you know about
Bell, and just where he’s gone.”
“I remember now he told me where he was going.”
“Where?” asked Simon, eagerly.
“To London.”
“To London!” repeated Simon, in disgust. “Why, he’d have to walk all
the way!”
“I don’t know anything about that.”
“Why didn’t you turn right round and bring him back to the school? Pa’d
have given you a sixpence.”
“Would he, now?”
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebooknice.com