(eBook PDF) Starting Out with Java: From Control Structures through Data Structures 3rd Edition download
(eBook PDF) Starting Out with Java: From Control Structures through Data Structures 3rd Edition download
https://ebookluna.com/product/ebook-pdf-starting-out-with-java-
from-control-structures-through-data-structures-3rd-edition/
https://ebookluna.com/product/ebook-pdf-starting-out-with-java-from-
control-structures-through-data-structures-4th-edition/
ebookluna.com
https://ebookluna.com/product/ebook-pdf-starting-out-with-java-from-
control-structures-through-objects-7th-edition/
ebookluna.com
https://ebookluna.com/product/ebook-pdf-starting-out-with-c-from-
control-structures-through-objects-8th-edition/
ebookluna.com
https://ebookluna.com/product/ebook-pdf-starting-out-with-c-from-
control-structures-through-objects-brief-version-8th-edition/
ebookluna.com
(eBook PDF) Starting Out with C++ from Control Structures
to Objects 9th Edition
https://ebookluna.com/product/ebook-pdf-starting-out-with-c-from-
control-structures-to-objects-9th-edition/
ebookluna.com
https://ebookluna.com/product/ebook-pdf-data-structures-and-
abstractions-with-java-4th-edition/
ebookluna.com
https://ebookluna.com/product/data-structures-and-abstractions-with-
java-5th-edition-ebook-pdf/
ebookluna.com
https://ebookluna.com/product/ebook-pdf-data-structures-and-
abstractions-with-java-4th-global-edition/
ebookluna.com
https://ebookluna.com/product/ebook-pdf-starting-out-with-java-early-
objects-5th-edition/
ebookluna.com
Contents vii
Index 1501
Contents xxi
Companion Website:
Chapter 23 Databases
Appendix A Working with Records and Random Access Files
Appendix B The ASCII/Unicode Characters
Appendix C Operator Precedence and Associativity
Appendix D Java Key Words
Appendix E Installing the JDK and JDK Documentation
Appendix F Using the javadoc Utility
Appendix G More about the Math Class
Appendix H Packages
Appendix I More about JOptionPane Dialog Boxes
Appendix J Answers to Checkpoints
Appendix K Answers to Odd-Numbered Review Questions
Appendix L Getting Started with Alice
Appendix M Configuring JavaDB
Case Study 1 Calculating Sales Commission
Case Study 2 The Amortization Class
Case Study 3 The PinTester Class
Case Study 4 Parallel Arrays
Case Study 5 The FeetInches Class
Case Study 6 The SerialNumber Class
Case Study 7 A Simple Text Editor Application
This page intentionally left blank
Location of Videonotes in the Text
VideoNote
“I was sorry not to see you as you passed down, and so missed the
opportunity of conveying to you personally a lot of evidence as to the
terrible maladministration practised in the past in the district. I saw the
official at the post of E E*. He is the successor of the infamous wretch D E,
of whom you heard so much yourself from the refugees at N*. This D E was
in this district in ..., ..., and ..., and he it was that depopulated the country.
His successor, M N, is very vehement in his denunciations of him, and
declares that he will leave nothing undone that he can do to bring him to
justice. He is now stationed at G G*, near our station at H H*. Of M N I
have nothing to say but praise. In a very difficult position he has done
wonderfully. The people are beginning to show themselves and gathering
about the many posts under his charge. M N told me that when he took over
the station at E E* from D E he visited the prison, and almost fainted, so
horrible was the condition of the place and the poor wretches in it. He told
me of many things he had heard of from the soldiers. Of D E shooting with
his own hand man after man who had come with an insufficient quantity of
rubber. Of his putting several one behind the other and shooting them all
with one cartridge. Those who accompanied me, also heard from the soldiers
many frightful stories and abundant confirmation of what was told us at N*
about the taking to D E of the organs of the men slain by the sentries of the
various posts. I saw a letter from the present officer at F F* to M N, in which
he upbraids him for not using more vigorous means, telling him to talk less
and shoot more, and reprimanding him for not killing more than one in a
district under his care where there was a little trouble. M N is due in
Belgium in about three months, and says he will land one day and begin
denouncing his predecessor the next. I received many favours from him, and
should be sorry to injure him in any way.... He has already accepted a
position in one of the Companies, being unable to continue longer in the
service of the State. I have never seen in all the different parts of the State
which I have visited a neater station, or a district more under control than
that over which this M N presides. He is the M N the people of N* told us
of, who they said was kind.
“If I can give you any more information, or if there are any questions you
would like to put to me, I shall be glad to serve you, and through you these
persecuted people.”
From a separate communication, I extract the following paragraphs:—
“...I heard of some half-dozen L* who were anxious to visit their old
home, and would be willing to go with me; so, after procuring some
necessary articles in the shape of provisions and barter, I started from our
post at N*. It was the end of the dry season, and many of the water-courses
were quite dry, and during some days we even found the lack of water
somewhat trying. The first two days’ travelling was through alternating
forest and grass plain, our guides, as far as possible, avoiding the villages....
Getting fresh guides from a little village, we got into a region almost entirely
forested, and later descended into a gloomy valley still dripping from the
rain. According to our guides we should soon be through this, but it was not
until the afternoon of the second day after entering that we once more
emerged from the gloom. Several times we lost the track, and I had little
inclination to blame the guides, for several times the undergrowth and a
species of thorn palm were trodden down in all directions by the elephants.
It would seem to be a favourite hunting ground of theirs, and once we got
very close to a large herd who went off at a furious pace, smashing down the
small trees, trumpeting, and making altogether a most terrifying noise. The
second night in this forest we came across, when looking for the track, a
little village of runaways from the rubber district. When assured of our
friendliness they took us in and gave us what shelter they could. During the
night another tornado swept the country and blew down a rotten tree, some
branches of which fell in amongst my tent and the little huts in which some
of the boys were sleeping. It was another most narrow escape.
“Early the next day we were conducted by one of the men of this village
to the right road, and very soon found ourselves travelling along a track
which had evidently been, at only a recent date, opened up by a number of
natives. ‘What was it?’ ‘Oh! it is the road along which we used to carry
rubber to the white men.’ ‘But why used to?’ ‘Oh, all the people have either
run away, or have been killed or died of starvation, and so there is no one to
get rubber any longer.’
“That day we made a very long march, being nearly nine and a-half hours
walking, and passing through several other large depopulated districts. On
all sides were signs of a very recent large population, but all was as quiet as
death, and buffaloes roamed at will amongst the still growing manioc and
bananas. It was a sad day, and when, as the sun was setting, we came upon a
large State post we were plunged into still greater grief. True, there was a
comfortable house at our service, and houses for all the party; but we had
not been long there before we found that we had reached the centre of what
was once a very thickly populated region, known as C C*, from which many
refugees in the neighbourhood of G* had come. It was here a white man,
known by the name of D E, lived.... He came to the district, and, after seven
months of diabolical work, left it a waste. Some of the stories current about
him are not fit to record here, but the native evidence is so consistent and so
universal that it is difficult to disbelieve that murder and rapine on a large
scale were carried on here. His successor, a man of a different nature, and
much liked by the people, after more than two and a-half years has
succeeded in winning back to the side of the State post a few natives, and
there I saw them in their wretched little huts, hardly able to call their lives
their own in the presence of the new white man (myself), whose coming
among them had set them all a-wondering. From this there was no fear of
losing the track. For many miles it was a broad road, from 6 to 10 feet in
width, and wherever there was a possibility of water settling logs were laid
down. Some of these viaducts were miles in length, and must have entailed
immense labour; whilst rejoicing in the great facility with which we could
continue our journey, we could not help picturing the many cruel scenes
which, in all probability, were a constant accompaniment to the laying of
these huge logs. I wish to emphasize as much as possible the desolation and
emptiness of the country we passed through. That it was only very recently a
well-populated country, and, as things go out here, rather more densely than
usual, was very evident. After a few hours we came to a State rubber post. In
nearly every instance these posts are most imposing, some of them giving
rise to the supposition that several white men were residing in them. But in
only one did we find a white man—the successor of D E. At one place I saw
lying about in the grass surrounding the post, which is built on the site of
several very large towns, human bones, skulls, and, in some places,
complete skeletons. On inquiring the reason for this unusual sight: ‘Oh!’
said my informant, ‘When the bambote (soldiers) were sent to make us cut
rubber there were so many killed we got tired of burying, and sometimes
when we wanted to bury we were not allowed to.’
“ ‘But why did they kill you so?’
“ ‘Oh! sometimes we were ordered to go, and the sentry would find us
preparing food to eat while in the forest, and he would shoot two or three to
hurry us along. Sometimes we would try and do a little work on our
plantations, so that when the harvest time came we should have something
to eat, and the sentry would shoot some of us to teach us that our business
was not to plant but to get rubber. Sometimes we were driven off to live for
a fortnight in the forest without any food and without anything to make a
fire with, and many died of cold and hunger. Sometimes the quantity
brought was not sufficient, and then several would be killed to frighten us to
bring more. Some tried to run away, and died of hunger and privation in the
forest in trying to avoid the State posts.’
“ ‘But,’ said I, ‘if the sentries killed you like that, what was the use? You
could not bring more rubber when there were fewer people.’
“ ‘Oh! as to that, we do not understand it. These are the facts.’
“And looking around on the scene of desolation, on the untended farms
and neglected palms, one could not but believe that in the main the story
was true. From State sentries came confirmation and particulars even more
horrifying, and the evidence of a white man as to the state of the country—
the unspeakable condition of the prisons at the State posts—all combined to
convince me over and over again that, during the last seven years, this
‘domaine privé’ of King Leopold has been a veritable ‘hell on earth.’
“The present régime seems to be more tolerable. A small payment is
made for the rubber now brought in. A little salt—say a pennyworth—for 2
kilogrammes of rubber, worth in Europe from 6 to 8 fr. The collection is still
compulsory, but, compared with what has gone before, the natives consider
themselves fairly treated. There is a coming together of families and
communities and the re-establishment of villages; but oh! in what sadly
diminished numbers, and with what terrible gaps in the families.... Near a
large State post we saw the only large and apparently normal village we
came across in all the three weeks we spent in the district. One was able to
form here some estimate of what the population was before the advent of the
white man and the search for rubber....”
It will be observed that the devastated region whence had come the
refugees I saw at N*, comprises a part of the “Domaine de la Couronne.”
Inclosure 2 in No. 3.
(See p. 29.)
(A.)
The Rev. J. Whitehead to Governor-General of Congo State.
Dear Sir,
Baptist Missionary Society, Lukolela, July 28, 1903.
I HAVE the honour to acknowledge the receipt of the Circular and the
List of Questions respecting the sleep sickness sent through the Rev. J. L.
Forfeitt.
I hasten to do my best in reply, for the matter is of paramount importance,
and I trust that if I may seem to trespass beyond my limits in stating my
opinions in reference to this awful sickness and matters kindred thereto, my
zeal may be interpreted as arising from excessive sorrow and sympathy for a
disappearing people. I believe I shall be discharging my duty to the State
and His Majesty King Leopold II, whose desire for the facts in the interests
of humanity have long been published, if I endeavour to express myself as
clearly as I can regarding the necessities of the natives of Lukolela.
The population of the villages of Lukolela in January 1891 must have
been not less than 6,000 people, but when I counted the whole population in
Lukolela at the end of December 1896 I found it to be only 719, and I
estimated from the decrease, as far as we could count up the number of
known deaths during the year, that at the same rate of decrease in ten years
the people would be reduced to about 400, but judge of my heartache when
on counting them all again on Friday and Saturday last to find only a
population of 352 people, and the death-rate rapidly increasing. I note also a
decrease very appallingly apparent in the inland districts during the same
number of years; three districts are well-nigh swept out (these are near to the
river), and others are clearly diminished; so that if something is not soon
done to give the people heart and remove their fear and trembling
(conditions which generate fruitfully morbid conditions and proneness to
attacks of disease), doubtless the whole place will be very soon denuded of
its population. The pressure under which they live at present is crushing
them; the food which they sadly need themselves very often must, under
penalty, be carried to the State post, also grass, cane string, baskets for the
“caoutchouc” (the last three items do not appear to be paid for); the
“caoutchouc” must be brought in from the inland districts; their Chiefs are
being weakened in their prestige and physique through imprisonment, which
is often cruel, and thus weakened in their authority over their own people,
they are put into chains for the shortage of manioc bread and “caoutchouc.”
In the riverine part of Lukolela we have done our very best as non-
official members of the State to cope with disease in every way possible to
us; but so far the officials of the State have never attempted even the feeblest
effort to assist the natives of Lukolela to recover themselves or guard
themselves in any way from disease. In times of small-pox, when no time
can be lost in the interests of the community, I have, perhaps, gone
sometimes beyond my rights as a private citizen in dealing with it. But there
has always been the greatest difficulty in getting food for them (the patients)
and nurses for them, even when the people were not compelled to take their
food supply to the State post, but when food supplies and labour are
compressed into one channel all voluntary philanthropy is paralyzed. It is
quite in vain for us to teach these poor people the need of plenty of good
food, for we appear to them as those who mock; they point to the food
which must be taken to the post. A weekly tax of 900 brass rods’ worth of
manioc bread from 160 women, half of whom are not capable of much hard
and continuous work, does not leave much margin for them to listen to
teaching concerning personal attention in matters of food. At present they
are compelled to supply a number of workmen, and some of these are
retained after their terms are completed against their will; the villages need
the presence of their men, there are at present but eighty-two in the villages
of Lukolela, and I can see the shadow of death over nearly twenty of them.
[21]
The inland people and their Chiefs tremble when they must go down to
the river, so much has been done latterly to shake their confidence, and this
fear is not strengthening them physically, but undermining their
constitutions, such as they are. They hate the compulsory “caoutchouc”
business, and they naturally do their best to get away from it. If something is
not quickly done to give these timid and disheartened people contentment
and their home life assured to them, sickness will speedily remove many,
and those who remain will look upon the white man, of whatever nation or
position, as their natural enemy (it is not far from that now). Some have
already sworn to die, be killed, or anything else rather than be forced to
bring in “caoutchouc,” which spells imprisonment and subsequent death to
them; what they hear as having been done they quite understand can be done
to them, so they conclude they may as well die first as last. The State has
fought with them twice already, if not more; but it is useless, they will not
submit. A cave of Adullam is a thing not always easily reckoned with.
May I be permitted to seize the present opportunity of respectfully
pleading on behalf of this people that their rights be respected, and that the
attention as of a father to his children be sympathetically shown them? May
I also be permitted to place before you a few suggestions which have been
impelled into my mind face to face with this dying people of what is their
need while medical inquiry goes forward, please God, to master this terrible
scourge? I suggest the following as immediately needful for the riverine
people:—
1. That the present small population of Lukolela be requested to vacate
the present site of their dwellings, and form a community on the somewhat
higher ground at present used for gardens, the soil of which has been
impoverished by years of manioc growing. This is known by the name
Ntomba; and that they be requested to clear the undergrowth on the beach,
the sites of their present dwellings, and plant bananas, &c.
2. That no one known to have sleep-sickness be permitted to dwell on the
new site; but all be removed to a site lower down the river; and that it shall
be the duty of the people to supply their sick with the necessary food and
caretakers. The islands are unsuitable, being uninhabitable for a large part of
the year.
3. That they be compelled to bury their dead at a considerable distance
from the dwellings, and to bury them in graves at least a fathom deep, and
not as at present in shallow graves in close proximity to the houses.
4. That they be encouraged to build higher houses with more apertures
for the ingress of sunshine and air in the daytime, and with floors
considerably raised above the outside ground.
5. That a strong endeavour be made to get them to provide better latrine
arrangements.
6. That they be encouraged to give up eating and drinking together from
the same dish or vessel in common.
7. That the men be encouraged to follow their old practices of hunting,
fishing, blacksmithing, &c., and with the women care for their gardens and
homes, and that they be given every protection in these duties and in the
holding of their property against the State soldiers and workmen and
everybody else that wants to interfere with their rights.
8. All the foregoing they will not be able to do unless the present
compulsory method of acquiring their labour and their food by the State is
exchanged for a voluntary one.
9. That the Chiefs or present chief representatives of the deceased Chiefs
among whom the land was divided before the State came into existence (I
believe about three will be found at Lukolela itself) be recognized as the
executive of these matters, and that they be requested to devote their levies
(restored as of old) made on the produce, &c., of their lands to the
betterment of their towns and district, by making roads through their lands,
&c.
10. To appoint sentries to carry out either the above or any other
beneficent rules in any of the villages would be to endeavour to mend the
present deplorable condition with an evil a hundred-fold worse.
All the above suggestions adjusted to suit the locality are equally
applicable to the inland districts.
In answering the list of questions I would say:—
1. Sleep-sickness is sadly only too well known at Lukolela. It is prevalent
in the whole of the riverine and inland districts. In the inland districts I am
not yet able to say whether it is more prevalent than in the riverine one; that
can only be ascertained by a more prolonged residence there than as yet I
have had opportunity to make. In the riverine district I estimate that quite
half of the deaths are from sleep-sickness. The cases do not occur in batches
like cases of small-pox and measles do; there are too many in a given place
unaffected at one time. It will, however, gradually sweep away whole
families. The common notion among the natives is that the sickness came
from down-river; and it was prevalent, though not to such an extent as now,
as far back as the oldest people I have met can remember. Before our
Mission was founded here a suspected case would be thrown into the river;
but inland I do not think there is any evidence to show that they did
otherwise than to-day—nurse their sick perfectly, heedless of the contagion
in respect of them (the nurses) or their friends, and, as they do on the beach,
bury their dead close to their houses, and in some cases live on the top of the
graves.
2. From my own observation (since January 1891) the sickness is
endemic; in the riverine villages the death-rate slowly increased until 1894,
when the people quite lost heart and felt their homes were no longer secure
to them, and then hunger, improper food, fear, and homelessness appeared to
increase the death-rate from sleep-sickness and other causes most
appallingly, and the rate has still further increased, especially during the last
two years. The fewer the population becomes the proportionate rate of death
increases most fearfully.
3. The district of Lukolela may be described as follows: The beach line is
wooded, broken by one or two creeks, one of which winds for a
considerable distance inland to a district which can be reached overland by a
journey of at least three days at the shortest. There is more or less of low-
lying land connected with the creeks. The 6 miles below the Mission station
is lower than the 8 miles above. The highest point of our land is about 19
metres above high-water level, and possibly there is a further rise of 3
metres or so further up stream. The ground which I suggest the people be
removed to may be on an average about 12 to 15 metres above high-water
level. This ridge of river bank shelves down into low-wooded land and grass
plains which are flooded at high water, though for the most part dry at the
lowest ebb; then behind these rise small plateaus separated by low valleys of
wooded and grassy land. From the pools and streams of this low ground the
people get most of their fish; even when the river is at medium height a
journey between the various plateaus where the villages and farms are found
requires about half the time to be spent in wading, sometimes breast deep.
4. A large proportion of the population is comprised of slaves, mostly
from the tributaries of the Equator district, some from the Mobsi, Likuba,
and Likwala peoples on the north bank, some from Ngombe below Irebu,
some from as far as the district of Lake Léopold II and other places. All the
tribes represented seem equally affected, and neither slave nor freeman
seems to have preferential treatment.
5. To an ordinary observer the men, women, and children appear to be
affected alike. It is not easy to always differentiate the sickness from other
maladies, for often it may be that the malady gives rise to various
complications; these complications are extremely intractable if sleep-
sickness be present. When a man in the prime of life has his prestige and
spirit broken through fear and punishment he loses interest in his home,
refuses to take food and drink; a sleep-sickness patient will do the same.
With the women in all cases we have known there is also present
amenorrhœa; sometimes treatment for this has restored the patient in this
respect for a time, but there has in all cases we have known of this sort been
a relapse; so whether the patient died of one or the other would be difficult
to say.
6. The well-fed do not seem to fall before the scourge so rapidly as the
ill-fed. The progress of the disease seems to us considerably slower as a rule
with those who take care of their food and habits, but it attacks even the
most scrupulously attentive to these matters.
There is a very bad practice amongst them: they will go sometimes days
without eating, although they may have manioc and plantain, and other
foods from the soil at hand, simply because they have no fish or flesh to eat
with them; sometimes they pinch themselves in food to retain their brass
rods for the purchase of some coveted article. The natives to-day are not so
careful in the preparation of food, and it is more hastily performed; the
manioc is eaten as nearly the raw state as they dare use it. The bitter manioc
is mostly grown, as the yield from it is greater than from any other kind.
Plantains are largely eaten roasted, and boiled, and beaten into a pudding.
Palm-nuts, too, they are very fond of, and the oil forms a good part of the
cooked foods. They use, especially in the absence of fish or flesh, the leaves
of the manioc, which are bruised and boiled; in nearly every case, however,
head-and stomach-ache follow, which pass off in a few days if bowels be
active. Well-peppered food they enjoy, and rotten fish and flesh they do not,
as a rule, despise. Their dried fish, of which a large quantity is eaten, is not
by any means always free from maggots. Elephant meat seems to give them
diarrhœa; dog-headed bats similarly; hippo meat generally produces slight
constipation. I am afraid a good deal of disease is passed from person to
person in the preparation of food. There is a great deal of eating together and
drinking together from one and the same vessel; they dip their hands in the
mess prepared as they sit round the pot, and I cannot say that they are too
careful of the condition of their hands at the time. Clothing is usually scant
except for decoration; hence the colder the weather the less the clothing, the
brighter and warmer the more they carry. Washing is not a very frequent
exercise among the natives. They like, as a rule, teeth kept clean, washing
them every day and after every meal. They like to smear their bodies with
oil and camwood. The hair is left undressed or dressed as the case may be
for weeks at a time without further cleansing. Sleeping is mostly done on
raised constructions of sticks, varying from half a-foot from the ground to
about 3 feet or so. I am afraid that not much in the way of covering is used
while sleeping, a blanket being mostly worn during the day as an article of
fine clothing. Many, especially those in temporary residence, sleep on the
ground floor with only a mat intervening. Jiggers, bugs, mosquitos, and
vermin abound in their houses on the beach, but jiggers are not so plentiful,
and mosquitos very rare inland. The inland people take great care of their
water sources, but on the beach the river water is largely used, and this is of
a dark brown colour; some is taken from the creeks, but it is very impure,
abounding with decayed vegetation and clay, and some from springs, such
as they are, and these are only surface drainings over the clayey subsoil. The
sweepings of their huts and refuse from their food is not thrown far away,
sometimes even being quite close up against one of the walls of the hut. In
the daytime they relieve themselves in the nearest sheltered spot without
further discrimination, and these places, in the present uncleared character of
their surroundings, are very close at hand; in the night time they are not so
particular, but will even relieve themselves in the open, and on the paths trod
by every one. The common belief is that the disease is communicated by
means of the secretions, and yet, strange to say, the natives take scarcely any
precautions.
7. All the cases we have known have been fatal. We have thought
sometimes we have done good with iodide of potassium and cod-liver oil,
but if it did any good at all it was only very temporary. We judge from our
observations that from the first symptoms which appear to be mental ones,
the best cared for cases last for from one to three years. Others in which
food is soon refused and neglect is suffered may speedily terminate in a few
months, or even weeks, from the first certain indications. The first
symptoms seem to be mental, the balance of thought fails at intervals, then
come the physical signs of pain in the lower part of the back; often thought
here to be piles, and they seek the usual remedies for this; later the pain