Java How to Program 9th Edition Deitel Test Bank download
Java How to Program 9th Edition Deitel Test Bank download
download
https://testbankdeal.com/product/java-how-to-program-9th-edition-
deitel-test-bank/
https://testbankdeal.com/product/java-how-to-program-9th-edition-
deitel-solutions-manual/
https://testbankdeal.com/product/java-how-to-program-late-
objects-10th-edition-deitel-test-bank/
https://testbankdeal.com/product/java-how-to-program-early-
objects-11th-edition-deitel-test-bank/
https://testbankdeal.com/product/microeconomics-9th-edition-boyes-
solutions-manual/
Horngrens Accounting The Managerial Chapters 10th Edition
Nobles Solutions Manual
https://testbankdeal.com/product/horngrens-accounting-the-managerial-
chapters-10th-edition-nobles-solutions-manual/
https://testbankdeal.com/product/general-organic-and-biological-
chemistry-2nd-edition-janice-gorzynski-smith-solutions-manual/
https://testbankdeal.com/product/essential-organic-chemistry-2nd-
edition-bruice-test-bank/
Drug Use and Abuse Canadian 1st Edition Maisto Test Bank
https://testbankdeal.com/product/drug-use-and-abuse-canadian-1st-
edition-maisto-test-bank/
https://testbankdeal.com/product/principles-of-economics-12th-edition-
case-solutions-manual/
Introduction to Risk Management and Insurance 10th Edition
Dorfman Test Bank
https://testbankdeal.com/product/introduction-to-risk-management-and-
insurance-10th-edition-dorfman-test-bank/
Chapter 10: Object-Oriented
Programming: Polymorphism
Section 10.1 Introduction
10.1 Q1: Polymorphism enables you to:
a. program in the general.
b. program in the specific.
c. absorb attributes and behavior from previous classes.
d. hide information from the user.
Ans: a. program in the general.
10.5 Q2: If the superclass contains only abstract method declarations, the
superclass is used for:
a. implementation inheritance.
b. interface inheritance.
c. Both.
d. Neither.
Ans: b. interface inheritance.
10.5.1 Q2: Which of the following statements about abstract superclasses is true?
a. abstract superclasses may contain data.
b. abstract superclasses may not contain implementations of methods.
c. abstract superclasses must declare all methods as abstract.
d. abstract superclasses must declare all data members not given values as
abstract.
Ans: a. abstract superclasses may contain data.
© Copyright 1992-2012 by Deitel & Associates, Inc. and Pearson Education, Inc.
public abstract class Foo
{
private int a;
public int b;
10.5.6 Q2: Every object in Java knows its own class and can access this information
through method .
a. getClass.
b. getInformation.
c. objectClass.
d. objectInformation.
Ans: a. getClass.
10.6 Q2: All of the following methods are implicitly final except:
a. a method in an abstract class.
b. a private method.
c. a method declared in a final class.
d. static method.
Ans: a. a method in an abstract class.
10.7 Q2: Which of the following does not complete the sentence correctly?
An interface .
a. forces classes that implement it to declare all the interface methods.
b. can be used in place of an abstract class when there is no default
implementation to inherit.
c. is declared in a file by itself and is saved in a file with the same name as the
interface followed by the .java extension.
d. can be instantiated.
Ans: d. can be instantiated.
© Copyright 1992-2012 by Deitel & Associates, Inc. and Pearson Education, Inc.
b. 1
c. 2
d. any number of
Ans: d. any number of
© Copyright 1992-2012 by Deitel & Associates, Inc. and Pearson Education, Inc.
Other documents randomly have
different content
of its animal food and all its fuel and salt. In other lines of work, it
makes its own boats and provides from its own resources the bulk of
the materials for its buildings which are constructed and erected
locally. Among the materials produced are all the timber, stone,
bricks, lime and mortar, and most of the iron and metal work are
made up there from raw material. In the matter of convict clothing,
all that is necessary to be purchased elsewhere is the roughest of
cotton hanks and wool in the first raw condition, every other
operation being performed on the spot. It provides much of its own
leather.
In achieving the results, the officers have had first to learn for
themselves as best they could how to turn out the work to hand and
then to teach what they had learned to the most unpromising pupils
that can be imagined for the work required of them in Port Blair. And
they have been hampered all along by the necessities of convict
discipline, by the constant release of their men and their punishment
for misconduct. It is under such conditions that the corps of
artificers and other convicts have had to be utilised. Nevertheless,
the roads and drains, the buildings and boats, the embankments and
reservoirs, are as good and durable as are the same class of
structures elsewhere. The manufacturers are sufficient for their
purpose, and there are among the taught those who are now skilled
in the use of many kinds of machinery. Cultivation is generally fair
and some of it very good; the general sanitation is literally second to
none.
The riddle was presently solved. “For some years one Sheik Kassam
had been gaoler. Belonging to the fisherman class and possessed of
very little education, he had, nevertheless, worked his way upward
through the police by dint of honesty, hard work and a certain
shrewdness which had more than once brought him to the front. At
last, toward the end of his service, the gaolership falling vacant, he
was, with everyone’s cordial approval, nominated to the post.” With
comparative rest and improved pay, the old gentleman waxed fatter
and jollier and was esteemed one of the most genial companions the
country could produce. The cares of state, and the responsibility of
three hundred murderous convicts, weighed lightly on Sheik Kassam.
He developed a remarkable talent or predilection for gardening,
almost from the first. “He laid out the quarry beds, brought water
down to irrigate them, produced all the gaol required in the way of
green stuff, and made tapioca and arrowroot by the ton. The better
plot of land belonging to the gaol lay between Sheik Kassam’s own
official residence, a tiny bungalow-fashioned dwelling, and a walled
courtyard near to the highroad. The sheik had no difficulty in
obtaining permission to erect a high wall of rubble from the quarries
along the whole road frontage, so that, as he urged, the convicts at
work in the garden would not be gazed at by passers-by, and that
forbidden articles, such as tobacco, sweetmeats, liquor, and the like,
should not be passed or even thrown over to them.”
Presently this favourite slice of garden was safely boxed in from the
public view by an enclosure some eight feet high, extending from
the gaol itself round to the gaoler’s house, the only entrance to it
being a little wicket-gate by the side of the sheik’s back-yard.
“There are four common prisons in Ava, but one of these only was
appropriated to criminals likely to suffer death. It derived its
remarkably well-selected name, Let-ma-yoon, literally interpreted,
‘Hand, shrink not,’ from the revolting scenes of cruelty practised
within its walls. This was the prison to which I was driven. My heart
sank within me as I entered the gate of the prison yard which, as it
closed behind me, seemed to shut me out forever from all the
interests and sympathies of the world beyond it. I was now delivered
over to the wretches, seven or eight in number, who guarded this
gaol. They were all condemned malefactors, whose lives had been
spared on the condition of their becoming executioners; the more
hideous the crime for which he had to suffer, the more hardened the
criminal, the fitter instrument he was presumed to be for the
profession he was henceforth doomed to follow. To render escape
without detection impossible, the shape of a ring was indelibly
tattooed on each cheek, which gave rise to the name they were
commonly known by, pahquet, or ‘ring-cheeked,’ a term detested by
themselves as one of reproach and one we never dared to apply in
addressing them. The nature of his qualification for the employment
was written in a similar manner across the breast. The chief of the
gang was a lean, wiry, hard-featured old man whom we taught
ourselves to address under the appellation aphe, ‘father,’ as did all
his subordinates. Another bearing an appropriate motto had
murdered his brother and had hidden his body piecemeal under his
house. A third was branded thoo-kho, ‘thief.’ This troop of wretches
were held in such detestation that the law prohibited their entering
any person’s house except in execution of their office. It happened,
soon after I entered, that the exigencies of this brotherhood were
great from an increase of business, and no brave malefactor
(inhumanity was always styled bravery here) being ready to
strengthen the force, a young man convicted of a petty offence was
selected to fill the vacancy. I beheld this poor youth doomed to the
most debasing ignominy for the rest of his life by these fatal rings,
his piteous cries at the degradation he was undergoing being
drowned by the jeers and ridicule of the confederates. They soon
made him as much a child of the devil as themselves.
“It is not easy to give a correct idea of the prison which was
destined to be my dwelling place for the first year of my captivity.
Although it was between four and five o’clock on a bright sunny
afternoon, the rays of light only penetrated through the chinks and
cracks of the walls sufficiently to disclose the utter wretchedness of
all within. Some time elapsed before I could clearly distinguish the
objects by which I was surrounded. As my eyes gradually adapted
themselves to the dim light, I ascertained it to be a room about forty
feet long by thirty feet wide, the floor and sides made of strong
teak-wood planks, the former being raised two feet from the earth
on posts, which, according to the usual style of Burmese
architecture, ran through the body of the building, and supported
the tiled roof as well as the rafters for the floor and the planking of
the walls. The height of the walls from the floor was five or six feet,
but the roof being a sloping one, the centre might be double that
height. It had no window or aperture to admit light or air except a
closely woven bamboo wicket used as a door, and this was always
kept closed. Fortunately, the builders had not expended much labour
on the walls, the planks of which here and there were not very
closely united, affording through the chinks the only ventilation the
apartment possessed, if we except a hole near the roof where,
either by accident or design, nearly a foot in length of decayed plank
had been torn off. This formed a safety-valve for the escape of foul
air to a certain extent; and, but for this fortuitous circumstance, it is
difficult to see how life could have been long sustained.
“In vain, however, did our little party court that blessing; passing by
the torment of thought, the sufferings of the body alone were
enough to prevent it. I had youth on my side, and my slender frame
enabled me to bear the suspension better than my fellow sufferers.
The tobacco smoke was a mercy, for it robbed the infliction of half
its torment. A year afterward, when we had to undergo a
punishment somewhat similar, though in a purer atmosphere, we
found the sting of the mosquitos, on the soles of our undefended
feet, ‘without the power to scare away’ these venomous little
insects, was intolerable; whereas in this well-smoked apartment a
mosquito could not live. We were not aware at the time what a
happy exemption this was. What a night was that on which we now
entered! Death, in its most appalling form, perhaps attended with
the agony of unknown tortures, was thought by all to be our certain
lot. Kewet-nee, who occupied the next place on the bamboo, excited
a horrible interest by the relation of a variety of exquisite tortures
which he had known to be perpetrated under that roof.
“The rays of the morning sun now began to struggle through the
chinks of the prison walls and told us that day dawned, bringing life
and happiness to the world outside, but only the consciousness of
misery to all within. The prisoners being counted and found to tally
correctly with the reckoning of overnight, symptoms of the routine of
the day began to attract attention. Our considerate parent made his
appearance and with his customary grin lowered down the bamboo
to within a foot of the floor, to the great relief of our benumbed
limbs in which the blood slowly began again to circulate. At eight
o’clock the inmates were driven out in gangs of ten or twelve at a
time, to take the air for five minutes, when they were huddled in
again, to make way for others; but no entreaty could secure a
repetition of the same favour that day, though a bribe, which few
could promise, might effect it. Fresh air, the cheapest of all the gifts
of Providence, was a close monopoly in the hands of the ‘sons of the
prison,’ who sold it at the highest price, and with a niggard hand.
“After breakfast the business of trying the prisoners began, and each
was brought in turn before the myo-serai, or assistant to the
governor. The first was a young man accused of being concerned in
the robbery of the house of a person of rank. Whether the
accusation was well founded or not I had no means of judging
except by the result; but certainly the man had not the appearance
of a robber. As a matter of course, he denied the crime; but denial
was assumed to be obstinacy, and the usual mode of overcoming
obstinacy was by some manner of torture. By order of the myo-
serai, therefore, he was made to sit upon a low stool, his legs were
bound together by a cord above the knees and two poles inserted
between them by the executioners, one of whom took the command
of each pole, the ground forming the fulcrum. With these the legs
were forced upwards and downwards and asunder, and underwent a
peculiar kind of grinding, inflicting more or less pain as the judge
gave direction. Every moment I expected to hear the thighbone
snap. The poor fellow sustained this torture with loud cries but still
with firmness until the agony became so intense that he fainted.
‘The tender mercies of the wicked are cruel.’ To restore animation
they resorted to cold water and shampooing. Thus revived, he was
again thrust back into his den with menaces of fresh torture on the
morrow, as no confession had yet been wrung from him. I may as
well finish the revolting story at once.
“True to his word, the myo-serai returned the next day to renew his
diabolical practices. This time the culprit was tied by the wrists
behind his back, the rope which bound them being drawn by a
pulley just high enough to allow his toes to touch the ground, and in
this manner he was left until he should become more reasonable. At
length, under the pressure of agonising pain, just in time to save the
dislocation of the shoulder, the criminal made his confession and
criminated two respectable persons as accomplices. From what
followed I presume this was all that was wanted. The man of justice
had now two men in his toils who were able to pay. The unfortunate
man, who, when relieved from the pain of the torture, acknowledged
he had accused innocent people, was returned to gaol fearfully
mangled and maimed; but instead of meeting a felon’s fate, when
time had been given to fleece the two victims, he was released.
“Within the walls nothing worthy of notice occurred until the hour of
three in the afternoon. As this hour approached, we noticed that the
talking and jesting of the community gradually died away. All
seemed to be under the influence of some powerful restraint, until
that fatal hour was announced by the deep tones of a powerful gong
suspended in the palace yard, and a deathlike silence prevailed. If a
word was spoken it was in a whisper. It seemed as though even
breathing were suspended under the control of a panic terror, too
deep for expression, which pervaded every bosom. We did not long
remain in ignorance of the cause. If any of the prisoners were to
suffer death that day, the hour of three was that at which they were
taken out for execution. The manner of it was the acme of cold-
blooded cruelty. The hour was scarcely told by the gong when the
wicket opened, and the hideous figure of a spotted man appeared,
who, without uttering a word, walked straight to his victim now for
the first time probably made acquainted with his doom. As many of
these unfortunate people knew no more than ourselves the fate that
awaited them, this mystery was terrible and agonising; each one
fearing, up to the last moment, that the stride of the Spot might be
directed his way. When the culprit disappeared with his conductor
and the prison door closed behind them, those who remained began
again to breathe more freely; for another day, at least, their lives
were safe.
“By degrees we settled down into the habits of the prison and were
becoming familiar with such scenes as I have recounted. We began
also to speculate on the length of time nature could hold out, if we
were left to test it. How long could we live in such a plight without
the use of water or other means of cleanliness? Would habit
reconcile us to it as it apparently had done many of our fellow
prisoners? Some of them had lived there for years. We gradually
became acquainted with them and with their crimes, real or
imputed. There were many cases in the calendar that were almost
incredible and showed that accident, caprice, superstition and even
carelessness occasioned their confinement. One grimy, half-starved
old man had been kept there three years and neither knew why he
was there nor who sent him. The crime of another must have been
that of a madman, or more probably it was a false accusation,
preferred to gratify private revenge. He was said to have made an
image of the king and to have walked over it. The mere imputation
of practising necromancy against the sacred person of the king was
a fatal charge. The poor fellow was taken from among us at the
hour of midnight and despatched by breaking his spine. Why this
singular method of slaughter was resorted to, as well as the manner
of carrying it into execution, was as mysterious as the crime itself;
they were not at all particular as to the mode of depriving their
victims of life, but seemed to be guided altogether by caprice.
“The plan of the prison yard shows that there were a number of
small cells used by the ringed brotherhood, and the pleading of our
amiable protectress secured for us the liberty to occupy them. It is
true they were very small, the one I inhabited being about five feet
wide with just enough length to lie down in; it was so low that I
could not stand upright except in the middle where the roof was
highest; but it was Elysium when compared with the suffocating
choke of the inner prison. Nor could it be called altogether solitary
confinement, for one of our gaolers had a pretty daughter about
sixteen years old, who took a wonderful fancy to me and was a
frequent visitor in my cell. She supplied me, too, with an
unspeakable luxury, water for ablution. Oh, who can appreciate the
gift but those who have been long deprived of it? A scrap of rag,
moistened with some of the water given us to drink, only served to
smear the grime like a plaster over our bodies. Now, once again I
could call myself comparatively clean. My cell had other advantages.
My eyes escaped many scenes of revolting cruelty; my ears, many
foul anathemas and gross abuse; my lungs and olfactories, all sorts
of abominations. The chief loss was the society of my friends. The
rats, too, were numerous and troublesome at first; but these,
though a disgusting nuisance, I managed to turn to account by the
fancy of the pahquets for their flesh. The Burmese hold rats in about
the same estimation as we do hares, and sell them commonly in
their markets for about their own weight in lead. My cell, therefore,
might be regarded as a well-stocked preserve for game. The
burrows ran in all directions, and hardly a day passed without my
bagging a few heads of this novel kind of game and handing them
over to my pretty visitor’s father, who willingly lent me his spear for
the purpose of destroying them. The bait of a few grains of boiled
rice at the entrance of the burrows brought them out in shoals and
gave me the opportunity of spearing them. ‘What do you expect will
be your fate?’ said this pious Buddhist as he once took the struggling
vermin from the spear, ‘when the time comes for me to serve you as
you are serving that creature?’ They all looked forward to the
pleasure of decapitating us, and when in a mild humour would
promise me as a favour, to use their greatest skill so that I should
scarcely feel it. What a consoling thought!
“Now news came of the defeat of the Burmese troops in the field,
and the governor wreaked his vengeance on us. We were all hustled
again from our cells into the inner prison, to await any fresh orders
that might be issued from the palace. A merciful Providence again
averted the danger. For a few days, probably a week, we were kept
in the old den of corruption, when time, as before, softened down
asperities, the rage of the governor and of our keepers began to
evaporate, and a little renewed coaxing, backed by such insignificant
bribes as our people could yet afford to pay, regained for us the
favour of the cells in which we were once more installed, and my
war of extermination against the rats recommenced.
The penal code of old Burmah in the pre-English days was primitive
and of ancient origin, being based largely upon the laws first
promulgated by Menu. Trial by ordeal was a very general rule, and
many forms were similar to those obtaining in other parts of the
world. One was to plunge a finger wrapped in a thin palm leaf into
molten tin; again, accused and accuser were immersed under water
and the case was won by the party who could remain the longest
time below. Or two candles made of equal portions of wax, carefully
weighed, were lighted by the two litigants, and the one which
burned longest was adjudged to have won.
“In the Indies,” says one old authority, “when one man accuses
another of a crime punishable by death, it is customary to ask the
accused if he is willing to go through trial by fire, and if he answers
in the affirmative, they heat a piece of iron till it is red hot; then he
is told to put his hand on the hot iron, and his hand is afterward
wrapped up in a bay leaf, and if at the end of three days he has
suffered no hurt he is declared innocent and delivered from the
punishment which threatened him. Sometimes they boil water in a
cauldron till it is so hot no one may approach it; then an iron ring is
thrown into it and the person accused is ordered to thrust in his
hand and bring up the ring, and if he does so without injury he is
declared innocent. Sometimes an iron chain or ball is used instead of
the ring. Sometimes a vessel of oil is heated, and a cocoanut is
thrown in to test the temperature, and if it cracks, then the
suspected person may prove his innocence by taking copper coins
out of the boiling oil.” Another ordeal was to take the accused to the
tomb of a Mohammedan saint and walk past, having first loaded him
with heavy fetters. If the fetters fall off, he is declared to be clear. “I
have heard it said,” is the comment of one authority who had little
confidence in the good faith of the tribunal, “that by some artful
contrivance the fetters are so applied as to fall off at a particular
juncture.”
The rich expiated any offence by the payment of a fine, while the
impecunious suffered imprisonment, stripes with a rattan, mutilation,
endless slavery, and in the extreme case, death. The sentence to
slavery extended to all a man’s belongings and to his descendants
forever. Capital punishment was performed by decapitation, and a
fiendish executioner often prolonged the agony of the condemned
convict. To throw a victim to be devoured by wild beasts or trodden
to death by elephants was a practice only surrendered in recent
times. In the northern provinces crucifixion was common, but the
instrument was not in the shape of an ordinary cross. It was more
like a double ladder consisting of three upright bamboos crossed by
three horizontal bars, and upon these two more were laid in the
shape of a St. Andrew’s cross. Three scaffolds were commonly
erected on river banks or on sand banks in the stream, and were
constantly seen on the Irrawady. Sometimes the culprit was killed
before he was affixed to the cross; sometimes he was tied up and
rendered helpless by a few spear thrusts, or disembowelled by a
sword cut across the stomach. In any case, the body was left
suspended until the flesh was pecked off by vultures and the bones
fell off by decay. When the mouths of the Irrawady were Burmese
territory, the criminal was lashed to a tree stump at low water and
left to be drowned by the incoming tide. The fishes, more voracious
than the vultures, were often more expeditious than the sea and ate
their prey alive. The tree, one of the undeveloped growth in the
mangrove swamps, was familiarly known as the “stump of hell.”
A Dacoit band for the most part numbered five or six; they were not
all armed with firearms, but they fired a few shots on making a
descent to give warning of their approach, and no resistance was
offered as they swooped down with loud shouts and much waving of
swords. Ransom was demanded or the village, if deserted, was
looted, and the Dacoits fled before the outrage became known to
the police. Then pursuit was organised, but was generally fruitless.
The Dacoits were close at hand, in the very village, and might be
easily seized, but no one would give information, as that would be
deemed an unpardonable offence. To betray an offender into the
hands of justice is a sin against religion much more than against
morality. There is the utmost difficulty, therefore, in tracing crime in
Burmah. British police officers were driven to death in ceaseless
efforts to catch Dacoits, hunting them perpetually for months and
months and seldom, if ever, laying hands on a single offender.
To follow this man on his reception and through his treatment will
give a good idea of prison life in Burmah. His clothing was first
issued to him; a loin cloth of coarse brown stuff and a strip of
sacking to serve as his bed. His hair was close cut and his head was
as smooth as the palm of his hand, save for one small tuft left on
the crown; his name was registered in the great book, and he was
led to the blacksmith’s shop, where his leg irons were riveted on
him, anklets in the form of a heavy ring to which a connecting ring
with two straight iron bars was attached. At the same time a neck
ring of iron as thick as a lead pencil was welded on, with a plate
attached, nine inches by five, on which a paper recording the
personal description of the individual was pasted. This was called the
thimbone, and its adoption became necessary through the frauds
practised by the convicts.
At one time every new arrival was given a tin medal stamped with
his number, which was hung round his neck with a string. But it was
found that these records were frequently exchanged among the
prisoners. A prisoner sentenced to a long term often assumed the
identity of a short term convict, who accepted the more irksome
penalty for a money consideration. At the present time, with the
irremovable thimbone, these exchanges are rendered impossible. It
is strange that such a simple process of preserving identities is not
enforced in Siberia, where Russian convicts have long made a
practice of fraudulent exchanges.
testbankdeal.com