Solutions manual to accompany introduction to java programming 9th edition

Page 1

Solutions Manual to accompany Introduction to Java Programming 9th edition Visit to download the full and correct content document: https://testbankbell.com/dow nload/solutions-manual-to-accompany-introduction-to-java-programming-9th-edition/

Solutions Manual to accompany Introduction to Java Programming 9th edition

To download the complete and accurate content document, go to: https://testbankbell.com/download/solutions-manual-to-accompany-introduction-to-jav a-programming-9th-edition/

Student Name: __________________

Class and Section

Total Points (20 pts)

Due: March 21, 2011 before the class

Project: Hangman

CSCI 2410 Data Structures and Algorithms

Armstrong Atlantic State University

Team Project: Form a team with 2 or 3 members. Each member needs to submit it online. Submit one hard copy for the team.

Team members: ________________________

Problem Description:

(

Game: hangman) Write a GUI program that lets a user play the hangman game. The user guesses a word by entering one letter at a time, as shown in Figure 16.33. If the user misses seven times, a hanging man swings, as shown in Figure 16.33b-c. Once a word is finished, the user can press the Enter key to continue to guess another word.

Your program needs to read the words from http://www.cs.armstrong.edu/liang/hangman.txt.

1
Figure 22.23 The program plays a hangman game.
Solutions Manual to accompany Introduction to Java Programming 9th edition Visit TestBankBell.com to get complete for all chapters

Requirements:

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 public class Exercise22_17

2

Testing: (Describe how you test this program)

Screen Shot

What to submit?

1. This document for the team

2. Compile and Submit to LiveLab (each team member must submit the program regardless whether it complete or incomplete, correct or incorrect)

3. Fill in self-evaluation:

1. Can your program read the words from the URL? _______________

2. Can your program display the initial user interface?

3. Can your program receive a character from the user?

4. Can your program check if the character is in the hidden word?

5. Can your program count the number of misses? ___________

6. Can your program display the hangman incrementally? ___________

7. Can your program display a hangman swing? __

8. Can your program start over with a new guess?

3
Solutions Manual to accompany Introduction to Java Programming 9th edition Visit TestBankBell.com to get complete for all chapters
_______________

Another random document with no related content on Scribd:

singular, the said F B alias D unto the said Hugh Auld, his executors and administrators, and against all and every other person or persons whatsoever, shall and will warrant and forever defend by these presents. In witness whereof, I set my hand and seal, this thirteenth day of November, eighteen hundred and forty-six (1846.)

T A.

“Signed, sealed, and delivered, in presence of Wrightson Jones, John C. Lear.”

The authenticity of this bill of sale is attested by N. Harrington, a justice of the peace of the state of Maryland, and for the county of Talbot, dated same day as above.

“To all whom it may concern: Be it known that I, Hugh Auld, of the city of Baltimore, in Baltimore county in the state of Maryland, for divers good causes and considerations, me thereunto moving, have released from slavery, liberated, manumitted, and set free, and by these presents do hereby release from slavery, liberate, manumit, and set free, , named F B, otherwise called D, being of the age of twenty-eight years, or thereabouts, and able to work and gain a sufficient livelihood and maintenance; and him the said negro man, named F D, I do declare to be henceforth free, manumitted, and discharged from all manner of servitude to me, my executors and administrators forever.

* * * * *

“In witness whereof, I the said Hugh Auld, have hereunto set my hand and seal the fifth of December, in the year one thousand eight hundred and forty-six.

“Sealed and delivered in presence of T. Hanson Belt, James N. S. T. Wright.”

Having remained abroad nearly two years, and being about to return to America, not as I left it—a slave, but a freeman, prominent friends of the cause of emancipation intimated their intention to make me a testimonial both on grounds of personal regard to me, and also to the cause to which they were so ardently devoted. How such a project would have succeeded I do not know, but many reasons led me to prefer that my friends should simply give me the means of obtaining a printing press and materials, to enable me to start a paper, advocating the interests of my enslaved and oppressed people. I told them that perhaps the greatest hindrance to the adoption of abolition principles by the people of the United States, was the low estimate everywhere in that country placed upon the negro as a man: that because of his assumed natural inferiority, people reconciled themselves to his enslavement and oppression, as being inevitable if not desirable. The grand thing to be done, therefore, was to change this estimation, by disproving his inferiority and demonstrating his capacity for a more exalted civilization than slavery and prejudice had assigned him. In my judgment a tolerably well conducted press in the hands of persons of the despised race, would by calling out and making them acquainted with their own latent powers, by enkindling their hope of a future, and developing their moral force, prove a most powerful means of removing prejudice and awakening an interest in them. At that time there was not a single newspaper regularly published by the colored people in the country, though many attempts had been made to establish such, and had from one cause or another failed. These views I laid before my friends. The result was, that nearly two thousand five

hundred dollars were speedily raised towards my establishing such a paper as I had indicated. For this prompt and generous assistance, rendered upon my bare suggestion, without any personal effort on my part, I shall never cease to feel deeply grateful, and the thought of fulfilling the expectations of the dear friends who had given me this evidence of their confidence, was an abiding inspiration for persevering exertion.

Proposing to leave England, and turning my face toward America in the spring of 1847, I was painfully reminded of the kind of life which awaited me on my arrival. For the first time in the many months spent abroad, I was met with proscription on account of my color. While in London I had purchased a ticket, and secured a berth, for returning home in the Cambria—the steamer in which I had come from thence—and paid therefor the round sum of forty pounds, nineteen shillings sterling. This was first cabin fare; but on going on board I found that the Liverpool agent had ordered my berth to be given to another, and forbidden my entering the saloon. It was rather hard after having enjoyed for so long a time equal social privileges, after dining with persons of great literary, social, political, and religious eminence, and never, during the whole time, having met with a single word, look, or gesture, which gave me the slightest reason to think my color was an offense to anybody—now to be cooped up in the stern of the Cambria, and denied the right to enter the saloon, lest my presence should disturb some democratic fellowpassenger. The reader can easily imagine what must have been my feelings under such an indignity

This contemptible conduct met with stern rebuke from the British press. The London Times, and other leading journals throughout the United Kingdom, held up the outrage to unmitigated condemnation. So good an opportunity for calling out British sentiment on the subject had not before occurred, and it was fully embraced. The result was that Mr. Cunard came out in a letter expressive of his regret, and promising that the like indignity should never occur again on his steamers, which promise I believe has been faithfully kept.

CHAPTER VII.

TRIUMPHS AND TRIALS.

New Experiences Painful Disagreement of Opinion with old Friends Final Decision to Publish my Paper in Rochester Its Fortunes and its Friends —Change in my own Views Regarding the Constitution of the United States—Fidelity to Conviction—Loss of Old Friends—Support of New Ones—Loss of House, etc., by Fire—Triumphs and Trials—Underground Railroad Incidents.

PREPARED as I was to meet with many trials and perplexities on reaching home, one of which I little dreamed was awaiting me. My plans for future usefulness, as indicated in the last chapter, were all settled, and in imagination I already saw myself wielding my pen as well as my voice in the great work of renovating the public mind, and building up a public sentiment, which should send slavery to the grave, and restore to “liberty and the pursuit of happiness” the people with whom I had suffered.

My friends in Boston had been informed of what I was intending, and I expected to find them favorably disposed toward my cherished enterprise. In this I was mistaken. They had many reasons against it. First, no such paper was needed; secondly, it would interfere with my usefulness as a lecturer; thirdly, I was better fitted to speak than to write; fourthly, the paper could not succeed. This opposition from a quarter so highly esteemed, and to which I had been accustomed to look for advice and direction, caused me not only to hesitate, but inclined me to abandon the undertaking. All previous attempts to establish such a journal having failed, I feared lest I should but add another to the list, and thus contribute another proof of the mental deficiencies of my race. Very much that was said to me in respect to my imperfect literary attainments, I felt to be most painfully true. The

unsuccessful projectors of all former attempts had been my superiors in point of education, and if they had failed how could I hope for success? Yet I did hope for success, and persisted in the undertaking, encouraged by my English friends to go forward.

I can easily pardon those who saw in my persistence an unwarrantable ambition and presumption. I was but nine years from slavery. In many phases of mental experience I was but nine years old. That one under such circumstances should aspire to establish a printing press, surrounded by an educated people, might well be considered unpractical if not ambitious. My American friends looked at me with astonishment. “A wood-sawyer” offering himself to the public as an editor! A slave, brought up in the depths of ignorance, assuming to instruct the highly civilized people of the north in the principles of liberty, justice, and humanity! The thing looked absurd. Nevertheless I persevered. I felt that the want of education, great as it was, could be overcome by study, and that wisdom would come by experience; and further (which was perhaps the most controlling consideration) I thought that an intelligent public, knowing my early history, would easily pardon the many deficiencies which I well knew that my paper must exhibit. The most distressing part of it all was the offense which I saw I must give my friends of the old Anti-Slavery organization, by what seemed to them a reckless disregard of their opinion and advice. I am not sure that I was not under the influence of something like a slavish adoration of these good people, and I labored hard to convince them that my way of thinking about the matter was the right one, but without success.

From motives of peace, instead of issuing my paper in Boston, among New England friends, I went to Rochester, N. Y., among strangers, where the local circulation of my paper—“T N S”—would not interfere with that of the Liberator or the AntiSlavery Standard, for I was then a faithful disciple of Wm. Lloyd Garrison, and fully committed to his doctrine touching the pro-slavery character of the Constitution of the United States, also the nonvoting principle of which he was the known and distinguished advocate. With him, I held it to be the first duty of the nonslaveholding States to dissolve the union with the slaveholding

States, and hence my cry, like his, was “No union with slaveholders.”

With these views I came into western New York, and during the first four years of my labors here I advocated them with pen and tongue, to the best of my ability. After a time, a careful reconsideration of the subject convinced me that there was no necessity for dissolving the “union between the northern and southern States;” that to seek this dissolution was no part of my duty as an abolitionist; that to abstain from voting was to refuse to exercise a legitimate and powerful means for abolishing slavery; and that the Constitution of the United States not only contained no guarantees in favor of slavery, but on the contrary, was in its letter and spirit an anti-slavery instrument, demanding the abolition of slavery as a condition of its own existence, as the supreme law of the land.

This radical change in my opinions produced a corresponding change in my action. To those with whom I had been in agreement and in sympathy, I came to be in opposition. What they held to be a great and important truth I now looked upon as a dangerous error. A very natural, but to me a very painful thing, now happened. Those who could not see any honest reasons for changing their views, as I had done, could not easily see any such reasons for my change, and the common punishment of apostates was mine.

My first opinions were naturally derived and honestly entertained. Brought directly, when I escaped from slavery, into contact with abolitionists who regarded the Constitution as a slaveholding instrument, and finding their views supported by the united and entire history of every department of the government, it is not strange that I assumed the Constitution to be just what these friends made it seem to be. I was bound not only by their superior knowledge to take their opinions in respect to this subject, as the true ones, but also because I had no means of showing their unsoundness. But for the responsibility of conducting a public journal, and the necessity imposed upon me of meeting opposite views from abolitionists outside of New England, I should in all probability have remained firm in my disunion views. My new circumstances compelled me to re-think the whole subject, and study with some care not only the just and proper rules of legal

interpretation, but the origin, design, nature, rights, powers, and duties of civil governments, and also the relations which human beings sustain to it. By such a course of thought and reading I was conducted to the conclusion that the Constitution of the United States—inaugurated “to form a more perfect union, establish justice, insure domestic tranquility, provide for the common defense, promote the general welfare, and secure the blessings of liberty”— could not well have been designed at the same time to maintain and perpetuate a system of rapine and murder like slavery, especially as not one word can be found in the Constitution to authorize such a belief. Then, again, if the declared purposes of an instrument are to govern the meaning of all its parts and details, as they clearly should, the Constitution of our country is our warrant for the abolition of slavery in every State of the Union. It would require much time and space to set forth the arguments which demonstrated to my mind the unconstitutionality of slavery; but being convinced of the fact my duty was plain upon this point in the farther conduct of my paper. The North Star was a large sheet, published weekly, at a cost of $80 per week, and an average circulation of 3,000 subscribers. There were many times, when in my experience as editor and publisher, I was very hard pressed for money, but by one means or another I succeeded so well as to keep my pecuniary engagements, and to keep my anti-slavery banner steadily flying during all the conflict from the autumn of 1847 till the union of the States was assured and emancipation was a fact accomplished. I had friends abroad as well as at home who helped me liberally. I can never be too grateful to Rev. Russell Laut Carpenter and to Mrs. Carpenter, for the moral and material aid they tendered me through all the vicissitudes of my paper enterprise. But to no one person was I more indebted for substantial assistance than to Mrs. Julia Griffiths Crofts. She came to my relief when my paper had nearly absorbed all my means, and was heavily in debt, and when I had mortgaged my house to raise money to meet current expenses; and by her energetic and effective management, in a single year enabled me to extend the circulation of my paper from 2,000 to 4,000 copies, pay off the debts and lift the mortgage from my house. Her industry was equal to her devotion. She seemed to rise with every emergency,

and her resources appeared inexhaustible. I shall never cease to remember with sincere gratitude the assistance rendered me by this noble lady, and I mention her here in the desire in some humble measure to “give honor to whom honor is due.” During the first three or four years my paper was published under the name of the North Star. It was subsequently changed to Frederick Douglass’ Paper in order to distinguish it from the many papers with “Stars” in their titles. There were “North Stars,” “Morning Stars,” “Evening Stars,” and I know not how many other stars in the newspaper firmament, and some confusion arose naturally enough in distinguishing between them; for this reason, and also because some of these stars were older than my star I felt that mine, not theirs, ought to be the one to “go out.”

Among my friends in this country, who helped me in my earlier efforts to maintain my paper, I may proudly count such men as the late Hon. Gerrit Smith, and Chief Justice Chase, Hon. Horace Mann, Hon. Joshua R. Giddings, Hon. Charles Sumner, Hon. John G. Palfry, Hon. Wm. H. Seward, Rev. Samuel J. May, and many others, who though of lesser note were equally devoted to my cause. Among these latter ones were Isaac and Amy Post, William and Mary Hallowell, Asa and Hulda Anthony, and indeed all the committee of the Western New York Anti-Slavery Society. They held festivals and fairs to raise money, and assisted me in every other possible way to keep my paper in circulation, while I was a nonvoting abolitionist, but withdrew from me when I became a voting abolitionist. For a time the withdrawal of their coöperation embarrassed me very much, but soon another class of friends were raised up for me, chief amongst whom were the Porter family of Rochester. The late Samuel D. Porter and his wife Susan F. Porter, and his sisters, Maria and Elmira Porter, deserve grateful mention as among my steadfast friends, who did much in the way of supplying pecuniary aid.

Of course there were moral forces operating against me in Rochester, as well as material ones. There were those who regarded the publication of a “Negro paper” in that beautiful city as a blemish and a misfortune. The New York Herald, true to the spirit of the

times, counselled the people of the place to throw my printing press into Lake Ontario and to banish me to Canada, and while they were not quite prepared for this violence, it was plain that many of them did not well relish my presence amongst them. This feeling, however, wore away gradually, as the people knew more of me and my works. I lectured every Sunday evening during an entire winter in the beautiful Corinthian Hall, then owned by Wm. R. Reynolds, Esq., who though he was not an abolitionist, was a lover of fair-play and was willing to allow me to be heard. If in these lectures I did not make abolitionists I did succeed in making tolerant the moral atmosphere in Rochester; so much so, indeed, that I came to feel as much at home there as I had ever done in the most friendly parts of New England. I had been at work there with my paper but a few years before colored travelers told me that they felt the influence of my labors when they came within fifty miles. I did not rely alone upon what I could do by the paper, but would write all day, then take a train to Victor, Farmington, Canandaigua, Geneva, Waterloo, Batavia, or Buffalo, or elsewhere, and speak in the evening, returning home afterwards or early in the morning, to be again at my desk writing or mailing papers. There were times when I almost thought my Boston friends were right in dissuading me from my newspaper project. But looking back to those nights and days of toil and thought, compelled often to do work for which I had no educational preparation, I have come to think that, under the circumstances it was the best school possible for me. It obliged me to think and read, it taught me to express my thoughts clearly, and was perhaps better than any other course I could have adopted. Besides it made it necessary for me to lean upon myself, and not upon the heads of our Anti-Slavery church. To be a principal, and not an agent. I had an audience to speak to every week, and must say something worth their hearing, or cease to speak altogether. There is nothing like the lash and sting of necessity to make a man work, and my paper furnished this motive power More than one gentleman from the south, when stopping at Niagara, came to see me, that they might know for themselves if I could indeed write, having as they said believed it impossible that an uneducated fugitive slave could write the articles attributed to me. I found it hard to get credit in some

Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.