Full Download Como Criar Programas Usando Java 1St Edition Carlos Alberto Barbosa Junior Online Full Chapter PDF
Full Download Como Criar Programas Usando Java 1St Edition Carlos Alberto Barbosa Junior Online Full Chapter PDF
https://ebookstep.com/product/equipes-brilhantes-como-criar-
grupos-fortes-e-motivados-portuguese-edition-coyle-daniel/
https://ebookstep.com/product/economia-basica-7th-edition-
alejandro-roberto-rodas-carpizo-carlos-alberto-rodas-arroyo/
https://ebookstep.com/product/manual-de-direito-previdenciario-
carlos-alberto-pereira-de-castro-joao-batista-lazzari/
https://ebookstep.com/product/iv-arquitecto-carlos-alberto-
cazares-salcido-col-arquitectos-decanos-2015th-edition-gilberto-
romero-moreno/
Como criar relações mais profundas Construindo
relacionamentos excepcionais com a família os amigos e
os colegas de trabalho 1st Edition David Bradford
Carole Robin
https://ebookstep.com/product/como-criar-relacoes-mais-profundas-
construindo-relacionamentos-excepcionais-com-a-familia-os-amigos-
e-os-colegas-de-trabalho-1st-edition-david-bradford-carole-
robin-2/
https://ebookstep.com/product/introducao-a-computacao-usando-
python-um-foco-no-1st-edition-ljubomir-perkovic/
https://ebookstep.com/product/linguagem-e-argumentacao-
juridica-5a-edicao-5th-edition-alda-da-graca-marques-valverde-
neli-luiza-cavalieri-fetzner-nelson-carlos-tavares-junior/
https://ebookstep.com/product/teoria-computacional-de-grafos-os-
algoritmos-com-programas-python-1st-edition-jayme-luiz-
szwarcfiter/
COMO CRIAR PROGRAMAS
USANDO JAVA
A PRENDENDO A PROGRAMAR DO JEITO FÁCIL
https://www.youtube.com/watch?v=ZVsHVwbGIOc
Produza a letra A.
Para produzir a letra B poderia sem o seguinte:
SEM ELETRICIDADE, SEM ELETRICIDADE, COM
ELETRICIDADE.
https://www.oficinadanet.com.br/artigo/1527/diferen
cas_entre_compiladores_e_interpretadores
Instalando as ferramentas
https://www.oracle.com/java/technologies/downloads
/
Figura01-01
A instalação é bem simples parecido com a instalação de
qualquer programa.
Figura01-02
Após instalar o JDK, precisamos instalar um editor de
texto para escrever os nossos código. Neste caso, vamos
usar uma IDE.
E, o que é IDE?
Figura01-03
Há várias IDE's diferentes e, para este livro, você pode
usar qualquer IDE.
Mas, neste livro, eu usarei a IDE chamado de Netbeans.
https://netbeans.apache.org/download/index.html
Figura01-06
Nós podemos criar programas usando as linguagens
C++, Java, PHP etc, no Netbeans.
Como vamos usar somente o Java, vamos habilitar
somente o Java no Netbeans.
Clique em:
Tools -> Plugins
Figura01-07
Figura01-08
Para podermos instalar plugins, precisamos clicar na
aba Setting, em seguida, habilitar "Netbeans 8.2 Plugin
Portal":
Figura01-09
Ao clicar na aba "Installed", eu irei habilitar as seguintes
opções:
Java SE
Tools
Developing Netbeans
Service Registry
Base IDE
Figura01-10
Figura01-11
Ao clicar neste botão, irá abrir outra janela para você
confirmar.
Figura01-12
Na aba "Available Plugins" você pode baixar e instalar
outro(s) plugin(s) que você desejar.
Para aparecer outros plugins disponíveis, você precisa
clicar no botão "Check for Newest".
Figura01-13
Figura01-14
Irá aparecer uma janela para confirmar (como
aconteceu antes).
Figura01-15
No meu caso há uma atualização, para instalar, clique no
botão "Update".
Primeiro programa
Figura01-16
Irá abrir uma janela. Você deve escolher a opção: java
with ant.
Figura01-17
Na próxima janela você deve escolher o nome e o local
onde ficará salvo o seu projeto.
Figura01-18
Figura01-19
Figura01-20
O netbeans já criou uma parte do código para nós. Esta
é a primeira vantagem que você pode ver de usar uma
IDE em vez de um simples editor de texto.
Figura01-21
System.out.println(“”);
Figura01-22
System.out.printls(“”)
Figura01-24
O resultado aparece no rodapé do Netbeans.
Figura01-25
Código completo:
/*
* Click
nbfs://nbhost/SystemFileSystem/Templates/Licenses/
license-default.txt to change this license
* Click
nbfs://nbhost/SystemFileSystem/Templates/Classes/
Main.java to edit this template
*/
package javaapp;
/**
*
* @author Carlos_Alberto
*/
public class JavaApp {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
System.out.println("Olá, mundo!");
}
Figura01-26
JavaApp é o nome do projeto que eu dei. No seu caso, o
seu arquivo estará localizado na pasta:
Figura01-27
O trecho:
É um método.
A função do método é de realizar tarefas.
Comentários
/*
* Click
nbfs://nbhost/SystemFileSystem/Templates/Licenses/licen
se-default.txt to change this license
* Click
nbfs://nbhost/SystemFileSystem/Templates/Classes/Main.j
ava to edit this template
Mas, ESPERE!!!!!!
Talvez, você esteja frustrado pelo fato de que o
Netbeans esteja exibindo o acento na palavra Olá de
uma maneira estranha.
Figura01-28
Figura01-29
Na janela que irá abrir, procure por Encoding:
Figura01-30
No Encoding, você deve escolher a opção ISO-8859-1,
clique em ok e, veja se o Netbeans exibe o acento
corretamente.
Figura01-31
Figura01-32
CAPÍTULO 2: GUARDANDO DADOS NA
MEMÓRIA
Figura02-01
Figura02-02
Variáveis
Exemplo:
System.out.println(variavel);
Código completo:
System.out.println(variavel);
}
}
Resultado:
Olá, mundo!
The show was a fairly good one, and Jack and the other boys, as
well as older persons in the audience, enjoyed the various numbers,
from the singing and dancing, to a one-act sketch.
More than one was anxious, however, for the time to come when the
amateurs would be given a chance. At length the manager came
before the curtain, and announced that those who wished might try
their talents on the audience.
Several of the boys began to call for this or that chum, whom they
knew could do some specialty.
“Give us that whistling stunt, Jimmy!” was one cry.
“Hey, Sim; here’s a chance to show how far you can jump!” cried
another.
“Speak about the boy on the burning deck!” suggested a third.
“Now we must have quietness,” declared the manager. “Those who
wish to perform may come up here, give me their names, and I will
announce them in turn.”
Several lads started for the stage, Jack included. His chums called
good-naturedly after him as he walked up the aisle.
“I might as well have all the fun I can to-night,” thought our hero.
“When Professor Klopper finds out what I’ve done, if he hasn’t
already, he’ll be as mad as two hornets.”
The boys, and one or two girls, who had stage aspirations, crowded
around the manager, eager to give in their names.
“Now, one at a time, please,” advised the theatrical man. “You’ll each
be given a chance. I may add,” he went on, turning to the audience,
“that the prizes will be awarded by a popular vote, as manifested by
applause. The performer getting the most applause will be
considered to have won the five dollars, and so with the other two
prizes.”
The amateurs began. Some of them did very well, while others only
made laughing stocks of themselves. One of the girls did remarkably
well in reciting a scene from Shakespeare.
At last it came Jack’s turn. He was a little nervous as he faced the
footlights, and saw such a large crowd before him. A thousand eyes
seemed focused on him. But he calmed himself with the thought that
it was no worse than doing as he had often done when taking part in
shows that he and his chums arranged.
While waiting for his turn Jack had made an appeal to the property
man of the auditorium, whom he knew quite well. The man, on
Jack’s request, had provided the lad with some white and red face
paint, and Jack had hurriedly made up as much like a clown as
possible, using one of the dressing-rooms back of the stage for this
purpose. So, when it came his turn to go out, his appearance was
greeted with a burst of applause. He was the first amateur to “make-
up.”
Jack was, naturally, a rather droll lad, and he was quite nimble on his
feet. He had once been much impressed by what a clown did in a
small circus, and he had practiced on variations of that entertainer’s
act, until he had a rather queer mixture of songs, jokes, nimble
dancing and acrobatic steps.
This he now essayed, with such good effect that he soon had the
audience laughing, and, once that is accomplished, the rest is
comparatively easy for this class of work on the stage.
Jack did his best. He went through a lot of queer evolutions, leaped
and danced as if his feet were on springs, and ended with an odd
little verse and a backward summersault, which brought him
considerable applause.
“Jack’ll get first prize,” remarked Tom Berwick to his chums, when
they had done applauding their friend.
But he did not. The performer after him, a young lady, who had
undoubted talent, by her manner of singing comic songs, to the
accompaniment of the orchestra, was adjudged to have won first
prize. Jack got second, and he was almost as well pleased, for the
young lady, Miss Mab Fordworth, was quite a friend of his.
“Well,” thought Jack, as the manager handed him the three dollars,
“here is where I have spending money for a week, anyhow. I won’t
have to see the boys turning up their noses because I don’t treat.”
The amateur efforts closed the performance, and, after Jack had
washed off the white and red paint, he joined his chums.
“Say, Jack,” remarked Tom, “I didn’t know you could do as well as
that.”
“I didn’t, either,” replied Jack. “It was easy after I got my wind. But I
was a bit frightened at first.”
“I’d like to be on the stage,” observed Tom, with something of a sigh.
“But I can’t do anything except catch balls. I don’t s’pose that would
take; would it?”
“It might,” replied Jack good-naturedly.
“Well, come on, let’s get some sodas,” proposed Tom. “It was hot in
there. I’ll stand treat.”
“Seems to me you’re always standing treat,” spoke Jack, quickly. “I
guess it’s my turn, fellows.”
“Jack’s spending some of his prize money,” remarked Charlie
Andrews.
“It’s the first I have had to spend in quite a while,” was his answer.
“Old Klopper holds me down as close as if he was a miser. I’ll be
glad when my dad comes back.”
“Where is he now?” asked Tom.
“Somewhere in China. We can’t find out exactly. I’m getting a bit
worried.”
“Oh, I guess he’s all right,” observed Charlie. “But if you’re going to
stand treat, come on; I’m dry.”
The boys were soon enjoying the sodas, and Jack was glad that he
had the chance to play host, for it galled him to have to accept the
hospitality of his chums, and not do his share. Now, thanks to his
abilities as a clown, he was able to repay the favors.
“Well, I suppose I might as well go in the front door as to crawl in the
window,” thought Jack, as he neared the professor’s house. “He
knows I’m out, for that old maid told him, and he’ll be waiting for me.
I’m in for a lecture, and the sooner it’s over the better. Oh, dear, but I
wish dad and mom were home!”
“Well, young man, give an account of yourself,” said the professor
sharply, when Jack came in. Mr. Klopper could never forget that he
had been a teacher, and a severe one at that. His manner always
savored of the classroom, especially when about to administer a
rebuke.
“I went to the show,” said Jack shortly. “I told you I was going.”
“In other words you defied and disobeyed me.”
“I felt that I had a right to go. I’m not a baby.”
“That is no excuse. I shall report your conduct to your parents. Now
another matter. Where did you get the money to go with?”
“I—I got it.”
“Evidently; but I asked you where. The idea of wasting fifty cents for
a silly show! Did you stop to realize that fifty cents would pay the
interest on ten dollars for a year, at five per cent?”
“I didn’t stop to figure it out, professor.”
“Of course not. Nor did you stop to think that for fifty cents you might
have bought some useful book. And you did not stop to consider that
you were disobeying me. I shall attend to your case. Do you still
refuse to tell me where you got that money?”
“I—I’d rather not.”
“Very well, I shall make some inquiries. You may retire now. I never
make up my mind when I am the least bit angry, and I find myself
somewhat displeased with you at this moment.”
“Displeased” was a mild way of putting it, Jack thought.
“I shall see you in the morning,” went on the professor. “It is
Saturday, and there is no school. Remain in your room until I come
up. I wish to have a serious talk with you.”
Jack had no relish for this. It would not be the first time the professor
had had a “serious talk” with him, for, of late, the old teacher was
getting more and more strict in his treatment of the boy. Jack was
sure his father would not approve of the professor’s method. But Mr.
Allen was far away, and his son was not likely to see him for some
time.
But, in spite of what he knew was in store for him the next morning,
Jack slept well, for he was a healthy youth.
“I suppose he’ll punish me in some way,” he said, as he arose, “but
he won’t dare do very much, though he’s been pretty stiff of late.”
The professor was “pretty stiff” when he came to Jack’s room to
remonstrate with his ward on what he had done. Jack never
remembered such a lecture as he got that day. Then the former
college instructor ended up with:
“And, as a punishment, you will keep to your room to-day and to-
morrow. I forbid you to stir from it, and if I find you trying to sneak
out, as you did last night, I shall take stringent measures to prevent
you.”
The professor was a powerful man, and there was more than one
story of the corporal punishment he had inflicted on rebellious
students.
“But, professor,” said Jack. “I was going to have a practice game of
baseball with the boys to-day. The season opens next week, and I’m
playing in a new position. I’ll have to practice!”
“You will remain in your room all of to-day and to-morrow,” was all
the reply the professor made, as he strode from Jack’s apartment.
CHAPTER IV
DISQUIETING NEWS
“Well, if this ain’t the meanest thing he’s done to me yet!” exclaimed
Jack, as the door closed on the retreating form of his crusty
guardian. “This is the limit! The boys expect me to the ball game,
and I can’t get there. That means they’ll put somebody else in my
place, and maybe I’ll have to be a substitute for the rest of the
season. I’ve a good notion——”
But so many daring thoughts came into Jack’s mind that he did not
know which one to give utterance to first.
“I’ll not stand it,” he declared. “He hasn’t any right to punish me like
this, for what I did. He had no right to keep me in. I’ll get out the
same way I did before.”
Jack looked from the window of his room. Below it, seated on a
bench, in the shade of a tree, was the professor, reading a large
book.
“That way’s blocked,” remarked the boy. “He’ll stay there all day,
working out problems about how much a dollar will amount to if put
out at interest for a thousand years, or else figuring how long it will
take a man to get to Mars if he traveled at the rate of a thousand
miles a minute, though what in the world good such knowledge is I
can’t see.
“But I can’t get out while he’s on guard, for he wouldn’t hesitate to
wallop me. And when he comes in to breakfast his sister will relieve
him. I am certainly up against it!
“Hold on, though! Maybe he forgot to bolt the door!”
It was a vain hope. Though Jack had not heard him do it, the
professor had softly slid the bolt across as he went out of the boy’s
room, and our hero was practically a prisoner in his own apartment.
And this on a beautiful Saturday, when there was no school and
when the first practice baseball game of the season was to be
played. Is it any wonder that Jack was indignant?
“It’s about time they brought me something to eat,” he thought, as he
heard a clock somewhere in the house strike nine. “I’m getting
hungry.”
He had little fear on the score that the professor would starve him,
for the old college instructor was not quite as mean as that, and, in a
short time, Miss Klopper appeared with a tray containing Jack’s
breakfast.
“I should think you would be ashamed of yourself,” she said. “The
idea of repaying my brother’s kindness by such acts! You are a
wicked boy!”
Jack wondered where any special kindness on the part of the
professor came in, but he did not say anything to the old maid whose
temper was even more sour than her brother’s. Since his parents
had left him with the professor, Jack had never been treated with real
kindness. Perhaps Mr. Klopper did not intend to be mean, but he
was such a deep student that all who did not devote most of their
time to study and research earned his profound contempt. While
Jack was a good boy, and a fairly good student, he liked sports and
fun, and these the professor detested. So, when he found that his
ward did not intend to apply himself closely to his books, Professor
Klopper began “putting the screws on,” as Jack termed it.
Matters had gone from bad to worse, until the boy was now in a
really desperate state. His naturally good temper had been spoiled
by a series of petty fault-findings, and he had been so hedged about
by the professor and his sister that he was ripe for almost anything.
All that day he remained in his room, becoming more and more
angry at his imprisonment as the hours passed.
“The boys are on the diamond now,” he said, as he heard a clock
strike three. “They’re practicing, and soon the game will start. Gee,
but I wish I was there! But it’s no use.”
Another try at the door, and a look out of his window convinced him
of this. The professor was still on guard, reading his big book.
Toward dusk the professor went in, as he could see no longer. But,
by that time Jack had lost all desire to escape. He resolved to go to
bed, to make the time pass more quickly, though he knew he had
another day of imprisonment before him. Sunday was the occasion
for long rambles in the woods and fields with his chums, but he knew
he would have to forego that pleasure now. He almost hoped it
would rain.
As he was undressing there came a hurried knock on his door.
“What is it?” he asked.
“My brother wants to see you at once, in his study,” said Miss
Klopper.
“Oh, dear,” thought Jack. “Here’s for another lecture.”
There was no choice but to obey, however, for Mr. Allen in his last
injunction to his son, had urged him to give every heed to his
guardian’s requests.
He found the professor in his study, with open books piled all about
on a table before which he sat. In his hand Mr. Klopper held a white
slip of paper.
“Jack,” he said, more kindly than he had spoken since the trouble
between them, “I have here a telegram concerning your father and
mother.”
“Is it—is it bad news?” asked the boy quickly, for something in the
professor’s tone and manner indicated it.
“Well, I—er—I’m sorry to say it is not good news. It is rather
disquieting. You remember I told you I cabled to the United States
Consul in Hong Kong concerning your parents, when several days
went by without either of us hearing from them.”
“What does he say?”
“His cablegram states that your parents went on an excursion
outside of Hong Kong about two weeks ago, and no word has been
received from them since.”
“Are they—are they killed?”
“No; I do not think so. The consul adds that as there have been
disturbances in China, it is very likely that Mr. and Mrs. Allen,
together with some other Americans, have been detained in a
friendly province, until the trouble is over. I thought you had better
know this.”
“Do you suppose there is any danger?”
“I do not think so. There is no use worrying, though I was a little
anxious when I had no word from them. We will hope for the best. I
will cable the consul to send me word as soon as he has any
additional news.”
“Poor mother!” said Jack. “She’s nervous, and if she gets frightened
it may have a bad effect on her heart.”
“Um,” remarked the professor. He had little sympathy for ailing
women. “In view of this news I have decided to mitigate your
punishment,” he added to Jack. “You may consider yourself at liberty
to-morrow, though I shall expect you to spend at least three hours in
reading some good and helpful book. I will pick one out for you. It is
well to train our minds to deep reading, for there is so much of the
frivolous in life now-a-days, that the young are very likely to form
improper thinking habits. I would recommend that you spend an hour
before you retire to-night, in improving yourself in Latin. Your
conjugation of verbs was very weak the last time I examined you.”
“I—I don’t think I could study to-night,” said Jack, who felt quite
miserable with his enforced detention in the house, and the
unpleasant news concerning his parents. “I’d be thinking so much
about my father and mother that I couldn’t keep my attention on the
verbs,” he said.
“That indicates a weak intellect,” returned the professor. “You should
labor to overcome it. However, perhaps it would be useless to have
you do any Latin to-night. But I must insist on you improving in your
studies. Your last report from the academy was very poor.”
Jack did not answer. With a heavy heart he went to his room, where
he sat for some time in the dark, thinking of his parents in far-off
China.
“I wish I could go and find them,” he said. “Maybe they need help. I
wonder if the professor’d let me go?”
But, even as that idea came to him, he knew it would be useless to
propose it to Mr. Klopper.
“He’s got enough of money that dad left for my keep, to pay my
passage,” the boy mused on. “But if I asked for some for a
steamship ticket he’d begin to figure what the interest on it for a
hundred years would be, and then he’d lecture me about being a
spendthrift. No, I’ll have to let it go, though I do wish I could make a
trip abroad. If I could only earn money enough, some way, I’d go to
China and find dad and mom.”
But even disquieting and sad thoughts can not long keep awake a
healthy lad, and soon Jack was slumbering. He was up early the
next morning, and, as usual, accompanied the professor to church.
The best part of the afternoon he was forced to spend in reading a
book on what boys ought to do, written by an old man who, if ever he
was a healthy, sport-loving lad, must have been one so many years
ago that he forgot that he ever liked to have fun once in a while.
Jack was glad when night came, so he could go to bed again.
“To-morrow I’ll see the boys,” he thought to himself. “They’ll want to
know why I didn’t come to play ball, and I’ll have to tell them the real
reason. I’m getting so I hate Professor Klopper!”
If Jack had known what was to happen the next day, he probably
would not have slept so soundly.
CHAPTER V
A SERIOUS ACCUSATION
“Hey, Jack, where were you Saturday?” asked Tom Berwick, as our
hero came into the school yard Monday morning. “We had a dandy
game,” he went on. “Your catching glove is nifty!”
“Yes, Fred Walton played short,” added Sam Morton. “We waited as
long as we could for you. What was the matter?”
“The professor made me stay home because I skipped out the night
before to go to the show.”
“Say, he’s a mean old codger,” was Tom’s opinion, which was
echoed by several other lads.
“Is Fred going to play shortstop regularly?” asked Jack, of Tom
Berwick, who was captain of the Academy nine.
“I don’t know. He wants to, but I’d like to have you play there, Jack.
Still, if you can’t come Saturdays——”
“Oh, I’ll come next Saturday all right. Can’t we have a little practice
this afternoon?”
“Sure. You can play then, if you want to. Fred has to go away, he
said.”
The boys had a lively impromptu contest on the diamond when
school closed that afternoon, and Jack proved himself an efficient
player at shortstop. It was getting dusk when he reached the
professor’s house, and the doughty old college instructor was
waiting for him.
“Did I not tell you to come home early, in order that I might test you in
algebra?” he asked Jack.
“Yes, sir. But I forgot about it,” which was the truth for, in the
excitement over the game, Jack had no mind for anything but
baseball.
“Where were you?” went on Mr. Klopper.
“Playing ball.”
“Playing ball! An idle, frivolous amusement. It tends to no good, and
does positive harm. I have no sympathy with that game. It gives no
time for reflection. I once watched a game at the college where I
used to teach. I saw several men standing at quite some distance
from the bare spot where one man was throwing a ball at another,
with a stick in his hand.”
“That was the diamond,” volunteered Jack, hoping the professor
might get interested in hearing about the game, and so forego the
lecture that was in prospect.
“Ah, a very inappropriate name. Such an utterly valueless game
should not be designated by any such expensive stone as a
diamond. But what I was going to say was that I saw some of the
players standing quite some distance from the bare spot——”
“They were in the outfield, professor. Right field, left field and centre.”
“One moment; I care nothing about the names of the contestants. I
was about to remark that those distant players seemed to have little
to do with the game. They might, most profitably have had a book
with them, to study while they were standing there, but they did not.
Instead they remained idle—wasting their time.”
“But they might have had to catch a ball any moment.”
“Nonsense!” exclaimed the professor. “It is an idle frivolous
amusement, and I regret very much that you wasted your valuable
time over it. After supper I want to hear you read some Virgil, and
also do some problems in geometry. I was instructed by your father
to see that your education was not neglected, and I must do my duty,
no matter how disagreeable it is.”
Jack sighed. He had studied hard in class that day, and now to be
made to put in the evening over his books he thought was very
unfair.
But there was no escape from the professor, and the boy had to put
in two hours at his Latin and mathematics, which studies, though
they undoubtedly did him good, were very distasteful to him.
“You are making scarcely any progress,” said the professor, when
Jack had failed to properly answer several of his questions. “I want
you to come home early from school to-morrow afternoon, and I will
give you my undivided attention until bedtime. I am determined that
you shall learn.”
Jack said nothing, but he did not think it would be wise to go off
playing ball the next afternoon, though the boys urged him strongly.
“Why don’t you write and tell your dad how mean old Klopper is
treating you?” suggested Tom, when Jack explained the reason for
going straight home from his classes.
“I would if I knew how to reach him. But I don’t know where he is,”
and Jack sighed, for he was becoming more and more alarmed at
the long delay in hearing from his father.
But Jack was destined to do no studying that afternoon under the
watchful eye of Professor Klopper. He had no sooner entered the
house than he was made aware that something unusual had
happened.
“My brother is waiting for you in the library,” said Miss Klopper, and
Jack noticed that she was excited over something.
“Maybe it’s bad news about the folks,” the boy thought, but when he
saw that the professor had no cablegram, he decided it could not be
that.
“Jack,” began the aged teacher, “I have a very serious matter to
speak about.”
“I wonder what’s coming now?” thought the boy.
“Do you recall the night you disobeyed me, and, sneaking out of your
window like a thief, you went to a—er—a theatrical performance
without my permission?” asked the professor.
“Yes, sir,” replied Jack, wondering if his guardian thought he was
likely to forget it so soon.
“Do you also recollect me asking you where you got the money
wherewith to go?”
“Yes, sir.”
“I now, once more, demand that you tell me where you obtained it,
and, let me warn you that it is serious. I insist that you answer me.
Where did you get that money?”
“I—I don’t want to tell you, Professor Klopper.”
“Are you afraid?”
“No, sir,” came the indignant answer, for there were few things of
which Jack Allen was afraid.
“Then why don’t you tell me?”
“Because I don’t think you have a right to know everything that I do. I
am not a baby. I assure you I got that money in a perfectly legitimate
way.”
“Oh, you did?” sneered the professor. “We shall see about that.
Come in,” he called, and, to Jack’s surprise the door opened and
Miss Klopper entered the library.
“I believe you have something to say on a subject that interests all
present,” went on the professor, in icy tones.
“She knows nothing of where I got the money,” said Jack.
“We shall see,” remarked Mr. Klopper. “You may tell what you know,”
he added to his sister.
“I saw Jack just as he got down out of his window,” Miss Klopper
stated, as if she was reciting a lesson. “He had a bundle with him. I
asked what it was and he would not tell me.”
“Is that correct?” inquired the former teacher.
“Yes, sir,” replied Jack, wondering how the professor could be
interested in his catching glove, which was what the bundle had
contained.
“What was in that package?” went on the professor.
“I—I don’t care to tell, sir.”
“I insist that you shall. Once again, I warn you that it is a very serious
matter.”
Jack could not quite understand why, so he kept silent.
“Well, are you going to tell me?”
“No, sir.”
Jack had no particular reason for not telling, but he had made up his
mind that the professor had no right to know, and he was not going
to give in to him.
“This is your last chance,” warned his guardian. “Are you going to tell
me?”
“No, sir.”
“Then I will tell you what was in that package. It was my gold loving
cup, that the teachers of Underhill College presented to me on the
occasion of my retirement from the faculty of that institution!”
“Your loving cup?” repeated Jack in amazement, for that cup was
one of the professor’s choicest possessions, and quite valuable.
“Yes, my loving cup. You had it in that bundle, and you took it out to
pawn it, in order to get money to go to that show.”
“That’s not true!” cried Jack indignantly. “All I had in that bundle was
my catching glove, which I sold to Tom Berwick.”
“I don’t believe you,” said the professor stiffly. “I say you stole my
loving cup and pawned it. The cup is gone from its accustomed
place on my dresser. I did not miss it until this afternoon, and, when I
asked my sister about it, she said she had not seen it. Then she
recalled your sneaking away from the house with a bundle, and I at
once knew what had become of it.”
“I say you took my cup!”
Page 41
“You couldn’t know, for there is absolutely no truth in this
accusation,” replied Jack hotly.
“Do you mean to say that I am telling an untruth?” asked the
professor sharply. “I say that you took my cup.”
“And I say that I didn’t! I never touched your cup! If it’s gone some
one else took it!”
Jack spoke in loud and excited tones.
“Don’t you dare contradict me, young man!” thundered the former
teacher. “I will not permit it. I say you took that cup! I know you did!”
“I didn’t!” cried Jack.
The professor was so angry that he took a step toward the lad. He
raised his hand, probably unconsciously, as though to deal Jack a
box on the ear, for this was the old teacher’s favorite method of
correcting a refractory student.
Jack, with the instinct of a lad who will assume a defensive attitude
on the first sign of an attack, doubled up his fists.
“What! You dare attempt to strike me?” cried the professor. “You
dare?”
“I’m not going to have you hit me,” murmured Jack. “You are making
an unjust charge. I never took that cup. I can prove what I had in that
package by Tom Berwick.”
“I do not believe you,” went on the professor. “I know you pawned
that cup to get spending money, because I refused to give you any to
waste. I will give you a chance to confess, and tell me where you
disposed of it, before I take harsh measures.”
Jack started. What did the professor mean by harsh measures?
“I can’t confess what I did not do,” he said, more quietly. “I never took
the loving cup.”
“And I say you did!” cried the old teacher, seeming to lose control of
himself. “I say you stole it, and I’ll have you arrested, you young
rascal! Go to your room at once, and remain there until I get an
officer. We’ll see then whether you’ll confess or not. I’ll call in a
policeman at once. See that he does not leave the house,” he added
to his sister, as he hurried from the room.
Jack started from the library.
“Where are you going?” asked Miss Klopper, placing herself in his
path. She was a large woman, and strong.
“I am going to my room,” replied Jack, sore at heart and very
miserable over the unjust accusation.