Programming Abstractions in Java 1st Edition Roberts Solutions Manual pdf download
Programming Abstractions in Java 1st Edition Roberts Solutions Manual pdf download
https://testbankdeal.com/product/programming-abstractions-in-
java-1st-edition-roberts-solutions-manual/
https://testbankdeal.com/product/data-structures-and-abstractions-
with-java-5th-edition-carrano-solutions-manual/
testbankdeal.com
https://testbankdeal.com/product/data-structures-and-abstractions-
with-java-4th-edition-carrano-solutions-manual/
testbankdeal.com
https://testbankdeal.com/product/java-programming-9th-edition-farrell-
solutions-manual/
testbankdeal.com
https://testbankdeal.com/product/journey-of-adulthood-7th-edition-
bjorklund-test-bank/
testbankdeal.com
Supply Chain Management 5th Edition Chopra Test Bank
https://testbankdeal.com/product/supply-chain-management-5th-edition-
chopra-test-bank/
testbankdeal.com
https://testbankdeal.com/product/auditing-cases-an-interactive-
learning-approach-7th-edition-beasley-solutions-manual/
testbankdeal.com
https://testbankdeal.com/product/busn-10th-edition-kelly-test-bank/
testbankdeal.com
https://testbankdeal.com/product/essentials-of-economics-6th-edition-
hubbard-solutions-manual/
testbankdeal.com
https://testbankdeal.com/product/basic-business-statistics-11th-
edition-berenson-test-bank/
testbankdeal.com
Project Management A Systems Approach to Planning
Scheduling and Controlling 12th Edition Kerzner Test Bank
https://testbankdeal.com/product/project-management-a-systems-
approach-to-planning-scheduling-and-controlling-12th-edition-kerzner-
test-bank/
testbankdeal.com
Answers to review questions from Chapter 8
1. In Java, what header line would you use to define a class named Sub that inherited the public behavior
from a class named Super?
public class Sub extends Super
2. True or false: The superclass specification in a new class definition may not be a parameterized class
with specific instantiation of the types.
False.
3. True or false: A new definition of a method in a Java subclass automatically overrides the definition of
that method in its superclass.
True.
4. What is an abstract class? Is it possible for an abstract class to provide its own implementation of its
exported methods?
An abstract class is a class definition that cannot be instantiated on its own but only by creating
one of its subclasses. The abstract class can provide implementations of exported methods,
which can then be used for any subclass.
5. What two levels of access control does Java offer beyond public and private?
Protected access is available to subclasses of the class and any classes in the same package.
Package-private classes (which do not specify any of public, private, or protected) are
available only to classes in the same package.
6. A constructor for a subclass always calls a constructor for its superclass. How do you specify that you
would like to call some constructor that is not the default constructor?
In many cases, it is better to embed an existing object inside a new class and then use forwarding
to implement the desired operations.
8. What are the three concrete GObject subclasses implemented in this chapter?
GRect, GOval, and GLine.
9. Which of these subclasses respond to the method setFilled? Which respond to the method
setColor? In which classes are these two methods defined?
The GRect and GOval classes respond to setFilled, which is defined in both of these classes.
The setColor method is defined in the GObject class and is therefore available in all three
subclasses.
10. In what ways does Java’s coordinate system differ from the traditional Cartesian coordinate system?
The Java coordinate system has its origin in the upper left corner instead of the lower left corner
traditionally used in the Cartesian plane.
12. What is the purpose of the synchronized statement in the implementation of the GWindow class?
Java’s synchronized statement is to ensure that two threads do not try to update some data
value simultaneously. In the GWindow implementation, the thread that runs the application is
independent of the thread that repaints the components on the screen. Without the
synchronized statement, it is possible that the application will try to add a GObject to the
contents list while the repainting thread is going through its elements.
‘ h hb h ld ll h
‘The Mission Miss Sahibas should sow well the grain,
Dark babies should fondle, dark women should train,
And Bibis and Begums at times entertain;
Should smile and should soothe, but not flatter or feign;
And to usefulness thus they may hope to attain.
CHAPTER IX
a.d. 1879
THE CHURCH AT BATALA
‘Batala, Jan. 16, 1879.—Mine own Laura, how could you write
regarding the little meeting, at which you and sweet Margaret were,
“Would you not like to be in my shoes at the time, and hold your
darling friend in your arms?” I would much rather have been in
Margaret’s shoes, and have held some one else in my arms,—only
for the wrench that would have followed! But O love, we are
travelling in the same train, only in different carriages; and I am
thankful that though we cannot see each other, we can as it were
talk to each other out of the windows. What a blessing the Post is!’
TO MISS ‘LEILA’ HAMILTON.
‘Jan. 20, 1879.
‘Ours is not to be a village church, dear, but one in a city of more
than 25,000 inhabitants, where there are graceful mosques, a large
idol-temple, etc. A mere mud shed would be quite out of character;
our present room in a schoolhouse would be better than that. There
is considerable difficulty and expense in buying a site. It ought to be
in the city. I have written to dear —— about one which Mr. Baring
has seen, but it is very doubtful whether the place can be
purchased.
‘My nephew and I are both economical, and I think that you and
dear Fred may depend on money not being wasted in useless
decorations. But the sacred edifice ought to be of brick, and pretty
strong, not only to endure for years, but also to keep out the heat. A
tiny church would not cost much; one so small that beams could
reach from side to side. But if our Church is to go on growing, as we
hope and pray that it may, what would be the advantage of having a
tiny chapel, which would not comfortably accommodate ourselves in
a fiery climate, and in which there would be no room at all for
heathen spectators? We should be wanting a second; and how could
we procure a second clergyman? Please thank dear Fred very, very
much for his kindness in collecting, and assure him that we wish to
make the money go as far as possible.’
TO MRS. HAMILTON.
‘Jan. 31.—I sometimes think that it is well for me that I have no
one to carry cushions after me,—as the dear A——s made the boys
do in George Square,—or to watch my face to see if I look pale. I
have been enabled to make efforts, for which I might not have
thought my frame capable, and have kept my health wonderfully.
‘This is the eighth day that I have not seen an English person!
Mera Bhatija has been away on duty; but I hope to have him back
to-morrow. I shall not be sorry to see him again; we are becoming
more and more like real Aunt and Nephew. He wanted me to go to
Amritsar during his needful absence; but there were strong reasons
against that....
‘As regards health, we are between Scylla and Charybdis. People
in India cannot help thinking a great deal about it, because five
minutes’ carelessness may wreck health for life; yet it is a great
matter for us, if possible, to keep from sinking to the languid
“cannot-do-anything” point. To rest there is something like letting
the head go under water. I often think of dear Uncle Tom’s
expression,—“Never say die!”’
TO MRS. E——
‘Feb. 4, 1879.
‘My nephew, the Rev. F. Baring, has organised little relief works;
for, owing to drought, and partly to the war, there is much distress in
Batala. If you were here, dear Aunt, it would interest you to walk
about, leaning on my arm, and see poor men in their rags, women
and children, carrying baskets of earth on their heads, to fill up that
part of the tank which is nearest to the house. It is a good thing for
us, but a better thing for the poor folk, who are thankful to earn
their pice. Mr. Baring intends also to give poor women in the city
employment in spinning, and to get a Christian native weaver to
make the cotton into towels or napkins....
‘Both my nephews, Mr. Bateman and Mr. Baring, are very clever in
finding ways to start the Converts in life, giving them means of
earning an honest livelihood. One fine lad has a place in the Woods
and Forests Department; another is learning work in the Press; a
third is to be employed in a religious book-shop; a fourth convert is
doing profitable business as a small wood-merchant. Another, who
has a little money of his own, intends to set up a small shop in his
own village. This is rather brave, as, only a month or two ago, he
was driven forth by his own family with threats and curses. It seems
to me that a very important part of a Missionary’s work is to watch
over converts after Baptism, both as regards body and soul. In the
Church, in the time of the Apostles, converts were not left to starve.
They must not be idle, but they must have the means of earning
their bread. We also greatly wish that every Native convert should
feel it to be his or her work to bring in others to Christ....
‘We intend to have a Fancy Fair in April, for the Church which we
hope to build; but the great puzzle will be to find buyers,—Mr. Baring
and myself being the only white folk in Batala, and Natives generally
disliking to spend money, except on marriages, funerals, jewels, and
sweetmeats.’
TO MRS. HAMILTON.
‘March 3.—I have another dear letter, to-day received, to thank
you for. You need take no thought, love, about where I sit. We have
benches in chapel; and as for my duli—to sit on its flat floor does not
hurt me in the least. I dare say that dear E. never got into the way
of it; but I take to it as a duck to the water. The only difficulty is the
scrambling out of the box; but this does me no harm; it is
wholesome exercise. As for a carriage, it would be useless in Batala.
I was regularly blocked in to-day, even in my tiny duli. The streets
are so narrow and so crowded....’
TO W. F. T. HAMILTON.
‘March 17.
‘Our saintly Bishop, Dr. French, is now our guest.... We are having
such an interesting time, a heart-warming time! There is to be a
Confirmation to-morrow; and oh, through what fiery trials some of
the dear candidates have come! There is B—n, ... the first man who
dared to be baptized in bigoted Batala. His Baptism cost him wife
and child. There is the thin, worn B. D., with his hair turning grey;
the only Christian in his village, he whom his own mother has
reviled.... There is the aged Faqir and his stalwart sons,—but I need
not enumerate all. I have told you enough to show what peculiar
features of interest may attend a Confirmation in India,—especially
perhaps in so thoroughly Oriental a place as this, where there are no
Europeans at all but my nephew and myself.
‘Ours is such a dear little Church,—I am not aware that there is
one really black sheep in it, though there are some infirm ones. Ten
women are to receive Confirmation. I think that all but perhaps one
have been converts from Muhammadanism or Hinduism. I do not
mean to say that they are all Batala people; but Batala is a genial
place to which converts seem drawn.
‘To-morrow, after Confirmation, we hope to spread, not the board
but the floor, for a goodly number of welcome guests, more even
than we had at Christmas. One feels very thankful to see such a nice
large Christian family.... Of course some Stations are more trying to
faith; some of God’s servants have to toil for years, and apparently
catch nothing; but about here in various directions one hears of
converts and inquirers. There is feeling of life stirring among the dry
bones.’
TO MRS. HAMILTON.
‘Batala, April 20, 1879.
‘Your dear, sweet letter received to-day was like a nice little visit to
me in my comparative loneliness. Mera Bhatija and Babu Singha are
both away at Amritsar.... If, when proposing to come out, I could
have been told that I should be all alone in a house with thirteen
Native boys,—my Ayah is absent from late illness,—I should have
been startled, perhaps half-frightened. But these dear fellows do not
worry me at all. I asked one of them yesterday: “If I were ill, which
of you would nurse me?” “All of us,” was the reply. I thought that
thirteen boys would be too much for a sick-room; so—“We would
take it in turns,” was the second answer....
‘Many thanks, love, for the two copies of the nice work on
Prophecies in the Old Testament. It ought to convince any candid
mind.... It might be valuable to English-reading Muhammadans. But
it is not at all necessary with them to avoid the Blessed Saviour’s
Name. Yesterday, in a Zenana a bright-looking young woman
exclaimed, not particularly apropos to anything that I was saying:
“Jesus Christ is the Son of God.” “Beshakh!” (Without doubt!)
instantly rejoined an older Bibi.
‘Not that the offence of the Cross has ceased. The persecution
which dear —— is enduring shows this. He has been beaten five or
six times; and I think that we shall have to try to get his enemies
bound over to keep the peace. Personally, I am courteously,
sometimes affectionately, treated. The poor converts are those who
have to endure hardness!’
‘April 27.—I know that some of my dear ones think that I must be
very lonesome, with no white woman near me. But there are three
things to prevent this:—1st, The Presence of the Master. 2nd, The
feeling that separation of body is nothing compared to separation of
soul. My ties to loved ones in England are not, thank God, broken!
They do not depend on mere space. 3rd, Real loneliness, as regards
even this world, is the want of love and sympathy. Some count my
brown friends for nothing in this way. I do not do so. They draw out
one’s affections, and respond to them. The heart does not shrivel up
in India, even when one lives in such an out-of-the-way place as
Batala.’
TO MRS. HAMILTON.
‘June 2, 1879.—Of course I cannot tell what God wills for me. I do
not intend to do anything foolish. I do not even let my mind dwell
much on the joy of going to a Heavenly Home, because it would
seem selfish at present to wish to desert others. I realise more the
value of life below than I used to do, and am thankful that at former
periods God did not fulfil my wish to leave this Earth for a better. He
is a poor soldier who is always pining for the end of the campaign!’
‘June 14.—I never felt so that the Word of God in my hand was
rejected, as in a Zenana to-day. When I came out, V., my kahar, said,
“You should not go to that house again. I was outside, but I heard
words that grieved me.” But I had two nice Zenanas and a nice
Native Christian home to balance. One of the nice Zenanas was N.’s.
He spoke almost like a Christian, before his mother, grandmother,
and handsome young bride. They all seemed quite friendly.’
TO MRS. HAMILTON.
‘July 29, 1879.
‘I will give you another of my little Batala sketches. I am sitting
reading. Enters M., the tall one-armed Faqir (religious beggar), who
has been acting as Mera Bhatija’s pankah-wala. He evidently wants
to talk with me; so, seeing me willing to listen, the tall fellow seats
himself on the floor, and begins....
‘The poor fellow had been thinking how he could earn his
livelihood,—he has a wife and four children, and of course religious
begging would be for a convert both improper and unprofitable.
“Pankah-pulling will last for but a short time,” he very truly observed.
His plan was to start a little school in his own village.
‘“But could you get pupils?” I asked, knowing that the humble
converts are not kindly treated by their neighbours.
‘“I think that I could from the hamlets round.”
‘Then I inquired as to the poor Faqir’s qualifications for a teacher.
“I can read the Gospel well,” was the simple reply.
‘“Can you write?”
‘He was weak in that, poor fellow. Having only one arm increases
the difficulty.
‘“Do you know accounts?”
‘“No,” he frankly owned; but he could learn; he would take pains.
‘“You had better speak to the Padri Sahib; he makes all the
bandobast (arrangements); he is wise and kind.”
‘If I would speak to the Padri Sahib,—he could tell me; but with
the Padri Sahib he was shy, etc.
‘It is rather refreshing to see a Native Christian, especially one
brought up to regard idleness rather as a virtue, turning over in his
mind what he can do to earn his living. If we help poor M. to a little
better education, perhaps his little village school may prove not a
bad idea, for the scholars would learn what is good from him,
though they could only have elementary teaching. I do not see why
rustics should want high education. The Government are educating
thousands of clever infidels, who cannot all find employment as
clerks, etc., and who will despise manual labour. We want simple
pious labourers to mind the plough, spell out their Testaments, and
try to obey God’s commands.’
August and September this year saw Miss Tucker,
not at Dalhousie, but at Dilur, 3000 feet above the
sea, with forest-clothed Himalayan slopes below, and
snow above. She went there, partly for the change,
but more for the sake of staying with a young
married couple, to whom her companionship was a
boon. The snow appears to have soon vanished, as
in one letter, written in September, she observes:
‘The mountains are quite high and bold enough for
beauty, though to my comfort there is not a soupçon
of snow upon any of them.’ From the budget of Dilur
letters, only two quotations can be given. The first is
rare in style at this period of Charlotte Tucker’s life.
She seldom found time for written ‘cogitations.’
TO MRS. HAMILTON.
‘Sept. 29.
‘Yes, precious Laura, you might be sure that Char does not forget
you in prayer any day; but your last dear letter from Ilfracombe
made me more inclined to praise. It seemed as if God had granted
just what I wished for you; that spiritual joy which is His special gift.
Why should the Children of Light tread the pilgrim way in heaviness?
“Light is sown for the righteous,” and the crop begins to show itself
even here....’
CHAPTER X
a.d. 1880-1881
LOYAL AND TRUE
‘What fearful people the Nihilists are! When one reads of them,
one seems to see Satan let loose! There is some similarity between
India and Russia. Perhaps some years hence a Nihilist crop may rise
from tens of thousands of sharp conceited lads whom the
Government so carefully educate without God! They cannot possibly
all get the prizes in life which they look for; they won’t dig,—so will
naturally swell the dangerous classes. Such dear lads as we have
here will be, we trust, as the salt in the mass. But they may have a
difficult work before them.’
‘June 4, 1880.—I think, love, that one gets into a kind of social
fetters. When we were young we had the worry of a footboy at our
heels,—it was thought suitable for our position. (Do you remember
dear Fanny’s lovely definition of that word?) When I was in
Edinburgh, dear —— was surprised, and I think a little shocked, at
“my father’s daughter” going in omnibuses. As if it were any disgrace
to my father’s middle-aged daughter to do what her precious
princely Sire had done a hundred times! O Laura, when one throws
aside these trammels of social position, one feels like a horse taken
out of harness, and set free in a nice green meadow. Our honoured
Father! what true dignity was his,—but how he shook off the
trammels!
‘To be mean and miserly is quite another thing. That dishonours
our profession. One should be ready to entertain hospitably, and to
pay for work done handsomely; there is a free hand and a generous
spirit quite consistent with economy.’
‘Dec. 15, 1880.—Dear Mr. Clark’s return has caused so much joy.
The Native Christians have had a loving address to him printed in
letters of gold. I fancy that a general feeling is, “Now there is a hand
on the reins.” ... Mr. Clark is an experienced and skilful driver. True,
he is very weak, but he brings brains, and a power of organisation.
If he were a prisoner to his room he might be very valuable still....
He was sadly missed....’