Introduction To Java Programming Comprehensive Version 10th Edition Liang Solutions Manual 1
Introduction To Java Programming Comprehensive Version 10th Edition Liang Solutions Manual 1
Problem Description:
1
Here are sample runs of the program:
Sample 1:
Enter a numerator: 16
Enter a denominator: 3
16 / 3 is an improper fraction and its mixed fraction is 5
+ 1 / 3.
Sample 2:
Enter a numerator: 6
Enter a denominator: 7
6 / 7 is a proper fraction
Sample 3:
Enter a numerator: 6
Enter a denominator: 2
6 / 2 is an improper fraction and it can be reduced to 3
Analysis:
(Describe the problem including input and output in your own words.)
Design:
(Describe the major steps for solving the problem.)
Coding: (Copy and Paste Source Code here. Format your code using Courier 10pts)
Name the program Exercise03_01Extra
2
Testing: (Describe how you test this program)
1. Print this Word file and Submit to me before the class on the due day
2. Compile, Run, and Submit to LiveLab (you must submit the program regardless
whether it complete or incomplete, correct or incorrect)
3
Code Solution:
import java.util.Scanner;
4
Another document from Scribd.com that is
random and unrelated content:
The Project Gutenberg eBook of The silver blade: The true
chronicle of a double mystery
This ebook is for the use of anyone anywhere in the United States and
most other parts of the world at no cost and with almost no restrictions
whatsoever. You may copy it, give it away or re-use it under the terms of
the Project Gutenberg License included with this ebook or online at
www.gutenberg.org. If you are not located in the United States, you will
have to check the laws of the country where you are located before using
this eBook.
Illustrator: A. B. Wenzell
Language: English
Credits: Al Haines
BY
CHICAGO
A. C. McCLURG & CO.
1908
COPYRIGHT
A. C. McCLURG & Co.
1906
CONTENTS
CHAPTER
I. Opening Ways
II. Fairchild Redivivus
III. "The Thunderbolt Has Fallen"
IV. Some Loose Ends
V. Mr. Slade Resigns
VI. An Arrest
VII. "Slade's Blessing"
I. "That Is Paquita"
II. The Serpent Strikes
III. Which Is the Last
ILLUSTRATIONS
Mr. Mountjoy's thin, handsome features were saved from asceticism only
by the lines of humor about his eyes
LIST OF CHARACTERS
A DUPLEX PROBLEM
CHAPTER I
In addition to the reserve squad, whose vigil never ends, many other
officers were present in the lazy transition stage between going on and
going off duty. The attention of them all was immediately attracted to the
stranger, and held by his extraordinary manner, from the instant he
became visible in the flickering gas-lights until he finally disappeared.
In the first place, he was not such a one as usually comes to the city-
hall basement, either voluntarily or when haled hither by one of the law's
myrmidons; for he was fashionably, even fastidiously, attired, with a
marked preciosity of manner which would have been even more
noticeable under ordinary conditions.
Looking neither to the right nor the left, the stranger walked directly
to the Chief of Police just as that official was in the act of closing and
locking his office door for the night. The latter looked up inquiringly,
and, struck at once by the young man's appearance, asked with sudden
sharpness:
The young man, his wild regard fastened on the Chief, tried to
answer; but he was incapable of speech, and the effort resulted only in a
queer, gasping sound.
"Murder! Murder has been done!" The words had the effect of a cry,
although uttered in a hoarse whisper.
"Murder, I tell you. Come with me at once; don't delay." He shook the
Chief's arm excitedly, and strove to draw him toward the door.
"There, there .... sit down there," said he, in a tone he might have used
to calm a terrified child. "You are upset. Sit there awhile and try to
collect yourself. Come; make an effort. Pull yourself together and tell me
about it."
"But the murderer!" the young man went on, still with high
excitement, but unconsciously sinking back into the chair under the
gentle pressure of the Chief's hand. "The murderer will escape! Great
Heavens, man! even now he may be assaulting the doctor—Mobley—do
you hear me?—he may have killed him! Send officers—go yourself—
anything but to sit here idle. Come!" He made as if to rise again; but the
other pressed him back.
The Chief regarded him for a moment with eyes that were mere pin-
points of light.
"You are Mr. J. Howard Lynden, are you not?" he presently asked.
The other nodded a quick affirmative. "I thought so," he continued.
"Who is the murderer? Who has been murdered?—or has any murder
been done? You don't make yourself clear."
Lynden twisted nervously upon his chair. "Heavens! you do not doubt
me?" he cried. "Why, Mobley's office is like a shambles. It's horrible!—
horrible! Mobley—Doctor Westbrook, that is—was standing right over
the dying man with—with—" He checked himself abruptly, as an
expression of horror deepened in his pale countenance.
But all these qualifications did not supply the force so conspicuously
absent from Mr. Lynden's personality, lacking which his perturbation was
not very impressive. He was not at all bad looking: he was even
handsome in a way; but the Chief of Police, as he looked, could not help
remarking that a more resolute man would have been less the slave of his
emotions in a situation like the present. While the young man sat
drumming with nervous fingers on the arms of his chair, the Chief
pressed a button beneath his desk, whereupon the door was almost
immediately opened by an officer, who, without entering, respectfully
awaited his superior's commands.
To him the Chief said, "If Converse is in, tell him to come to my
office;" and as the door closed, "I want Captain Converse to hear this,"
he explained to Lynden; "it seems to be a matter for his department."
The two had not long to wait. A man entered, cast a piercing glance at
the visitor, and took his stand at a corner of the roll-top desk, waiting
with an air of deferential attention. He was a man of physique so
immense—with such a breadth of shoulders and absence of neck—that
his more than average height was much disguised. Above all, he was one
whose appearance must attract attention in any gathering of his kind; for
even as Lynden seemed to lack those desirable traits, so force and
resolution flowed from this man's rugged personality, making their
influence felt subtly and insistently. His air of quiet composure was
evocative of confidence. Endowed with the impassiveness of an Indian,
one could hardly imagine him excited or agitated in any circumstances.
The Chief recognized his presence with a brief nod, and at once
addressed Lynden:
"Repeat what you have told me; see if you can't make it plainer."
The visitor recounted the bare facts in a more connected manner. "But
I was so shocked," he supplemented, "that I am afraid I can't make
myself intelligible. The facts explain nothing to my mind further than
that an atrocious murder has been committed, that the victim is still lying
in Doctor Westbrook's office, and that no one seems to know who is
responsible for the deed."
"But I fail to understand," the Chief frowned. "Do you mean to say
that a man was stabbed in the presence of Doctor Westbrook, and that he
knows nothing about it?"
"Wait!" he cried, his face lighting. "I forgot to say there was another
man present in Doctor Westbrook's office—a stranger to me. I never saw
him before."
"And he?"
"Just like Mobley and myself, he appeared to be overcome by the
shocking occurrence."
"It is that," the Chief agreed, emphatically. "For that very reason you
must tell all you know. Now, why should you hesitate in regard to the
weapon? Come now, what about it?"
"Well, sir, I answer you under protest; remember, I did not see the
blow struck."
"Sure?"
The young man nearly sprang from his chair. The interruption, a
penetrating, sibilant bullet of speech, came from the massive figure of
Mr. Converse; again that shrewd regard was fastened on him, and the
sweat started from his brow.
"No!" he cried, explosively; "I did not. By George, how nervous I am!
—but I think half-truths should not be told. No one is less capable of
perpetrating such a deed than Mobley Westbrook. Why, you know the
man!" He appealed with feverish eagerness to the two figures now
sternly confronting him. "Every one knows Mobley Westbrook's
character; would he do such a thing?"
"Well, Mobley had some kind of a—blade, a—dagger in his hand; but
—"
"Ah! And standing over a man whose very life-blood is ebbing away
beneath his eyes!" The Chief's manner was politely ironical, and struck
the young man cold. "You must admit that you portray an astonishing set
of circumstances to surround a man not only innocent but ignorant of an
offence," concluded the official, pointedly.
Lynden indeed started from his chair. "I knew it! I knew it!" cried he,
wildly. "I knew you would put such a construction upon my words; now,
damn it! I'll not say another word. Go—go! Go and see for yourselves
how wrong you are!"
After a minute or two the Chief returned. "I have sent for a carriage,"
said he. "As soon as it arrives I must request you to accompany Captain
Converse to Doctor Westbrook's offices; are you willing to do that?" He
awaited the reply with an interest mingled with doubt of what its
probable tenor might be; when the young man acquiesced with an
alacrity and relief obviously sincere, his doubt merely grew. He
contemplated Lynden an instant longer, and with a curt nod, seated
himself at his desk again.
Under the soothing influence of rubber tires spinning easily over the
smooth asphalt, the young man was fast regaining his lost composure.
He was so rapt in his own thoughts that for a time he quite forgot his still
companion, and presently he laughed—mirthlessly, but a laugh
signifying sudden relief. Quite as suddenly it was checked, as he met the
inquiring, probing glance of his vis-à-vis.
"The Doctor is a strong, vigorous man, isn't he? I don't see why he
couldn't."
The young man, with another shudder, drew back to the corner of the
vehicle farthest from his companion.
As the vehicle proceeds, a few words about those whose names have
been mentioned, together with some others who will figure in this
narrative, will give a better idea of the importance of the tragedy, the ill
tidings of which Lynden had been the bearer.
It is probable that his presence and name were better known in every
part of the State than those of any other living man. For the class which
he represented was that noble body of patricians—handsome and
recklessly brave men, and beautiful, high-minded women—who have
given the world criterions by which human excellence and human
weakness alike may be measured; and his position was a personal hobby,
persistently and consistently ridden.
There was but one uniting link between Mobley and his father and
mother—the latter even more distant and unapproachable than her
spouse—and that was the daughter and sister, Joyce. Whatever their
differences, the family was held together by affection for this beautiful
girl.
The love that bound Joyce and Mobley was deep and abiding. It is not
surprising, then, when the question of his sister's marriage became
gossip, that Mobley should have taken a stand on the subject which
brought about a final and complete rupture from his father and mother.
The name with which his sister's had been linked was no other than that
of this same Alberto de Sanchez, who now lay dead, with a ghastly
knife-wound in his throat, in the Doctor's own office.
CHAPTER II
It was now night outside, and the stairs were faintly illuminated by the
single incandescent lamp which hung at their head in the hall of the
second story. The sole indication that Mr. Converse was striving to allow
nothing to escape his observation was the quickness with which he
stooped, when near the top, and picked something from the stairs—
something too small for Lynden to catch even a glimpse of—which,
whatever it was, the Captain scrutinized intently a moment, and, without
comment, dropped into the large pocket-book he brought forth from an
inside pocket. The two continued on their way until they reached Doctor
Westbrook's office.
Everything was as Lynden had left it, save for the fact that Doctor
Westbrook, and the stranger mentioned by the young man, had been
joined by several other persons.
One was a swarthy, lean man, whose face was pitted by small-pox,
and whose rather dull eyes remained expressionless behind a pair of
gold-rimmed pince-nez. He was standing aloof from the others, and
seemed to be taking only languid interest in what was going forward.
Occasionally he coughed in a manner that told much to the physician's
trained ear; save for this, he remained silent. Mr. Merkel, the coroner,
and a uniformed policeman were also present.
Mr. Merkel was fussy, important, and wholly incompetent; and the
Captain was so accustomed to his repetitions of phrases that were not, to
say the least, pregnant with meaning, that he ignored them and turned to
an inspection of the dead man.
The body lay just as it had fallen. Somebody had placed a
handkerchief over the face, a covering that also hid an ugly wound in the
throat. Mr. Converse stooped and removed this, and began a minute but
rapid examination of the still form. It reposed in the Doctor's reception-
room, close to the wall, partially on its back and partially on its right
side. The right arm was extended, the fingers of that hand still in a
position as though upon the point of grasping something. Curved
naturally across the breast, the left arm suggested restful slumber rather
than death by violence; but whatever the eyes had last looked upon,
before the film dimmed their lustre, it had stamped upon the handsome
features an indelible expression of mingled terror and horror, which one
could scarcely regard without an inward tremor of something very like
fear. It was an expression likely to remain disagreeably in the memory
for a long time.
When these effects were inventoried, while Mr. Merkel was assorting
them at Doctor Westbrook's writing-table, the dark man with the pince-
nez stepped forward. All eyes were turned toward him, excepting,
apparently, those of Converse, which continued to give the body and the
reception-room floor their attention.
"Pardon, señores," said the dark man, bestowing a bow upon the
entire group, and ending it at the Coroner; "is there anything addressed to
Juan Vargas, or Juan de Vargas? I am he."
Mr. Merkel looked at him sternly, and held up the two long envelopes.
The man's eyes, dull and unmoving, continued to regard Mr. Merkel.
Had he been discussing the weather his tones could have been no more
dispassionate.
The Coroner tore open the envelopes, and, as the man had said, one
contained a deed, conveying certain land to Juan Sebastian de Vargas y
Escolado, the notary's certificate showing it had been signed and
acknowledged that very day before Clay Fairchild. Alberto de Sanchez
had made the transfer. The other envelope disclosed a certificate for one
thousand shares of stock in the Paquita Gold Mining and Milling
Company, also made over to Señor Vargas in due form. The papers told
no more.
"I happen to know that this gentleman is Señor de Vargas," said he.
"He called here with—with Señor de Sanchez last evening. I have heard
something of this deal between the two, and I believe it represents the
occasion of this gentleman's presence in the city at this time."
"Good!" returned the Mexican. "I desire not for my humble affairs to
stand in the path of justice." Bowing once more, he returned to his
former position away from the others.
However, as the Captain placed it upon the table his eyes took in
every occupant of the room in one rapid sweeping glance, only to drop as
he stooped and whispered to the Coroner, who there upon nodded and
turned to the waiting group.
"Now, gentlemen," said he, "this is not the inquest, of course; but let
us hear what you have to say about this. You first, Doctor Westbrook;
you first."
"What I can tell you will seem much less than it should," the Doctor
returned. "It was about five o'clock, and I was sitting at my table—there,
where you are now. I had just finished a letter to no other than Señor de
Sanchez himself."
"Is this it?" the Coroner interrupted, extending a letter to the speaker.
Doctor Westbrook replied affirmatively, and proceeded with his recital.
"I had just completed and blotted it, and was preparing to address the
envelope, when I heard footsteps in the hall. I paused, with the pen in my
hand, and listened, for I was expecting Señor de Sanchez to call at my
office this evening, though not so early, and I imagined the footsteps
might be his. As I listened, I noted that my door was not quite shut, and
the footfalls advanced steadily down the hall, approaching my office.
When immediately outside the door, and while I was looking up
expectant of the caller's entrance, they ceased abruptly. There was a
slight sound of scraping on the floor of the hall, as though the man—
whom I could not then see—were endeavoring to rub something from his
shoe-sole on the boards, or had slipped slightly; without the slightest
warning, his whole weight plunged against the door. It was thrown
violently open by the impact, and I was horrified to behold Señor de
Sanchez stagger through, his right hand extended in front of him, as if
groping for support. As he crossed the threshold he lurched to his right
and struck the wall, along which he slid to the floor, just as you now see
him."
It was Converse's sibilant whisper which now rudely broke into the
recital. At the same time he thrust the silver blade close to the other's
face.
"It is," replied the Doctor; "and I did not recognize it until this minute.
How did it—why—" he began vaguely; but Merkel interrupted.
"Well," said he, with a wave of the hand that seemed to dispose of all
complications, "it will be time enough for questions when you have
finished."
"But, Doctor Westbrook," insisted Mr. Merkel, "was there no one else
in the hall? Did you hear no other footsteps? Didn't you see or hear some
one else when the door was thrust wide open? Surely the murderer
couldn't have left so quickly without attracting the attention of some one
of you. It is simply incredible." He grasped the arms of his chair, leaning
forward in his eagerness, his heavy countenance overshadowed with
perplexity.
"I must say no to all those questions," was the Doctor's reply. "I saw
nobody but De Sanchez. I heard nothing but his footsteps, and the noise
he made in collapsing through this door. Ask Jim Lynden, there; he was
in the hall at the time; he followed so closely behind De Sanchez that he
arrived here before the man died."
Lynden merely shook his head, hopelessly, as if he had no vocabulary
to express himself. The Coroner was impressed by the young man's
mien, and after regarding him a moment with a scowl, turned again to
Doctor Westbrook.
"And who are you, if I may ask?" bluntly demanded the Coroner.
"My name is Ferdinand Howe, sir," the stranger replied, with dignity.
"My home is in Bruceville, Georgia, and I am in your city on business
for the bank of which I happen to be the cashier. Doctor Westbrook and I
are old college-mates, and I know about as much of this affair as he has
told you; that is to say, I was there—the other side of that partition in the
laboratory—when the murdered man fell where you now see him. The
first intimation I had that anything was amiss was when the outside door
crashed open and the body fell to the floor. I ran into this room, saw the
man gasp twice, and then lie motionless. I never saw him, and never
heard of him, before this night. That is all."
Mr. Howe appeared to be about the Doctor's age, and was a fair type
of the American man of business. He was well groomed, clean, and
possessed of a clear, steady eye.
"And you saw and heard no one else?" Mr. Merkel persisted.
Howe shook his head. "No, sir; no one. There was not the slightest
thing to indicate—"
He stopped. He shot a swift, startled glance at Doctor Westbrook; but
the Doctor remained unconscious of it, evidently absorbed in his own
cogitations. Mr. Converse's eyes watched the speaker through mere slits,
so nearly closed were they; but a gleam came from between the
contracted lids that might have betrayed a quickened interest somewhere
in the depths of his big frame.
Suddenly the young man caught Converse's intent look, and his own
eyes lowered. Next they shifted to Doctor Westbrook, at whom he
continued to look in a moody silence.
The Coroner, apparently more and more at sea, stared first at one and
then another of the room's occupants, at the partition which separated the
reception-room from the laboratory, and lastly through the open doorway
into the hall. The most extreme of the different points were not over six
feet apart; and for three men—wide awake and in full possession of their
faculties—to be so close to such a crime and know nothing of it until it
was all over! How could human ingenuity supply an explanation for so
incongruous a circumstance? Had the man committed suicide? The most
cursory examination of the wound demonstrated beyond doubt that,
however else it might have been inflicted, Alberto de Sanchez was
incapable of having administered it himself.
Meanwhile the Captain was moving from one to another of the group,
his whisper barely audible, but persistent and pervading the entire room.
Occasionally he made a brief memorandum upon an envelope,—
cabalistic marks which no one but himself could have deciphered. Then
the whisper again for a moment, followed by a deferential lowering of
his gray head as he hearkened to the reply. Had one been observing him
closely he would have noticed that the circle of inquiry gradually
narrowed. The policeman he paid no attention to at all; he was soon