Building Java Programs 3rd Edition Reges Test Bank pdf download
Building Java Programs 3rd Edition Reges Test Bank pdf download
https://testbankdeal.com/product/building-java-programs-3rd-
edition-reges-test-bank/
https://testbankdeal.com/product/building-java-programs-a-back-to-
basics-approach-4th-edition-reges-test-bank/
testbankdeal.com
https://testbankdeal.com/product/building-java-programs-a-back-to-
basics-approach-4th-edition-reges-solutions-manual/
testbankdeal.com
https://testbankdeal.com/product/juvenile-justice-policies-programs-
and-practices-3rd-edition-taylor-test-bank/
testbankdeal.com
https://testbankdeal.com/product/recruitment-and-selection-in-
canada-7th-edition-catano-test-bank/
testbankdeal.com
Introductory Chemistry 1st Edition Revell Test Bank
https://testbankdeal.com/product/introductory-chemistry-1st-edition-
revell-test-bank/
testbankdeal.com
https://testbankdeal.com/product/modern-principles-microeconomics-3rd-
edition-cowen-solutions-manual/
testbankdeal.com
https://testbankdeal.com/product/business-driven-information-systems-
australian-3rd-edition-baltzan-test-bank/
testbankdeal.com
https://testbankdeal.com/product/business-essentials-canadian-7th-
edition-ebert-solutions-manual/
testbankdeal.com
https://testbankdeal.com/product/cengage-advantage-books-business-law-
today-the-essentials-text-and-summarized-cases-11th-edition-miller-
test-bank/
testbankdeal.com
Human Resource Management 3rd Edition Hartel Solutions
Manual
https://testbankdeal.com/product/human-resource-management-3rd-
edition-hartel-solutions-manual/
testbankdeal.com
Sample Final Exam #8
(Summer 2009; thanks to Victoria Kirst)
1. Array Mystery
Consider the following method:
public static void arrayMystery(int[] a) {
for (int i = 1; i < a.length - 1; i++) {
a[i] = a[i + 1] + a[i - 1];
}
}
Indicate in the right-hand column what values would be stored in the array after the method arrayMystery executes
if the integer array in the left-hand column is passed as a parameter to it.
Original Contents of Array Final Contents of Array
int[] a1 = {3, 7};
arrayMystery(a1); _____________________________
1 of 8
2. Reference Semantics Mystery
(Missing; we didn't give this type of question that quarter.)
3. Inheritance Mystery
Assume that the following classes have been defined:
public class Denny extends John { public class Michelle extends John {
public void method1() { public void method1() {
System.out.print("denny 1 "); System.out.print("michelle 1 ");
} }
}
public String toString() {
return "denny " + super.toString(); public class John extends Cass {
} public void method2() {
} method1();
System.out.print("john 2 ");
public class Cass { }
public void method1() {
System.out.print("cass 1 "); public String toString() {
} return "john";
}
public void method2() { }
System.out.print("cass 2 ");
}
Given the classes above, what output is produced by the following code?
Cass[] elements = {new Cass(), new Denny(), new John(), new Michelle()};
for (int i = 0; i < elements.length; i++) {
elements[i].method1();
System.out.println();
elements[i].method2();
System.out.println();
System.out.println(elements[i]);
System.out.println();
}
2 of 8
4. File Processing
Write a static method called runningSum that accepts as a parameter a Scanner holding a sequence of real numbers
and that outputs the running sum of the numbers followed by the maximum running sum. In other words, the nth
number that you report should be the sum of the first n numbers in the Scanner and the maximum that you report
should be the largest such value that you report. For example if the Scanner contains the following data:
3.25 4.5 -8.25 7.25 3.5 4.25 -6.5 5.25
3 of 8
5. File Processing
Write a static method named plusScores that accepts as a parameter a Scanner containing a series of lines that
represent student records. Each student record takes up two lines of input. The first line has the student's name and
the second line has a series of plus and minus characters. Below is a sample input:
Kane, Erica
--+-+
Chandler, Adam
++-+
Martin, Jake
+++++++
Dillon, Amanda
++-++-+-
The number of plus/minus characters will vary, but you may assume that at least one such character appears and that
no other characters appear on the second line of each pair. For each student you should produce a line of output with
the student's name followed by a colon followed by the percent of plus characters. For example, if the input above is
stored in a Scanner called input, the call of plusScores(input); should produce the following output:
Kane, Erica: 40.0% plus
Chandler, Adam: 75.0% plus
Martin, Jake: 100.0% plus
Dillon, Amanda: 62.5% plus
4 of 8
6. Array Programming
Write a method priceIsRight that accepts an array of integers bids and an integer price as parameters. The method
returns the element in the bids array that is closest in value to price without being larger than price. For example, if
bids stores the elements {200, 300, 250, 999, 40}, then priceIsRight(bids, 280) should return 250,
since 250 is the bid closest to 280 without going over 280. If all bids are larger than price, then your method should
return -1.
The following table shows some calls to your method and their expected results:
Arrays Returned Value
int[] a1 = {900, 885, 989, 1}; priceIsRight(a1, 880) returns 1
int[] a2 = {200}; priceIsRight(a2, 320) returns 200
int[] a3 = {500, 300, 241, 99, 501}; priceIsRight(a3, 50) returns -1
int[] a2 = {200}; priceIsRight(a2, 120) returns -1
You may assume there is at least 1 element in the array, and you may assume that the price and the values in bids will
all be greater than or equal to 1. Do not modify the contents of the array passed to your method as a parameter.
5 of 8
7. Array Programming
Write a static method named compress that accepts an array of integers a1 as a parameter and returns a new array
that contains only the unique values of a1. The values in the new array should be ordered in the same order they
originally appeared in. For example, if a1 stores the elements {10, 10, 9, 4, 10, 4, 9, 17}, then
compress(a1) should return a new array with elements {10, 9, 4, 17}.
The following table shows some calls to your method and their expected results:
Array Returned Value
int[] a1 = {5, 2, 5, 3, 2, 5}; compress(a1) returns {5, 2, 3}
int[] a2 = {-2, -12, 8, 8, 2, 12}; compress(a2) returns {-2, -12, 8, 2, 12}
int[] a3 = {4, 17, 0, 32, -3, 0, 0}; compress(a3) returns {4, 17, 0, 32, -3}
int[] a4 = {-2, -5, 0, 5, -92, -2, 0, 43}; compress(a4) returns {-2, -5, 0, 5, -92, 43}
int[] a5 = {1, 2, 3, 4, 5}; compress(a5) returns {1, 2, 3, 4, 5}
int[] a6 = {5, 5, 5, 5, 5, 5}; compress(a6) returns {5}
int[] a7 = {}; compress(a7) returns {}
Do not modify the contents of the array passed to your method as a parameter.
6 of 8
8. Critters
Write a class Caterpillar that extends the Critter class from our assignment, along with its movement behavior.
Caterpillars move in an increasing NESW square pattern: 1 move north, 1 move east, 1 move west, 1 move south,
then 2 moves north, 2 moves east, etc., the square pattern growing larger and larger indefinitely. If a Caterpillar
runs into a piece of food, the Caterpillar eats the food and immediately restarts the NESW pattern. The size of the
Caterpillar’s movement is also reset back to 1 move in each direction again, and the increasing square pattern
continues as before until another piece of food is encountered.
Here is a sample movement pattern of a Caterpillar:
• north 1 time, east 1 time, south 1 time, west 1 time
• north 2 times, east 2 times, south 2 times, west 2 times
• north 3 times, east 3 times, south 3 times, west 3 times
• (runs into food)
• north 1 time, east 1 time, south 1 time, west 1 time
• north 2 times, east 1 time
• (runs into food)
• north 1 time
• (runs into food)
• north 1 time, east 1 time, south 1 time, west 1 time
• north 2 times, east 2 times, south 2 times, west 2 times
• (etc.)
Write your complete Caterpillar class below. All other aspects of Caterpillar besides eating and movement
behavior use the default critter behavior. You may add anything needed to your class (fields, constructors, etc.) to
implement this behavior appropriately.
7 of 8
9. Classes and Objects
Suppose that you are provided with a pre-written class Date as // Each Date object stores a single
described at right. (The headings are shown, but not the method // month/day such as September 19.
bodies, to save space.) Assume that the fields, constructor, and // This class ignores leap years.
methods shown are already implemented. You may refer to them
or use them in solving this problem if necessary. public class Date {
private int month;
Write an instance method named subtractWeeks that will be private int day;
placed inside the Date class to become a part of each Date
object's behavior. The subtractWeeks method accepts an // Constructs a date with
integer as a parameter and shifts the date represented by the Date // the given month and day.
public Date(int m, int d)
object backward by that many weeks. A week is considered to be
exactly 7 days. You may assume the value passed is non- // Returns the date's day.
negative. Note that subtracting weeks might cause the date to public int getDay()
wrap into previous months or years.
// Returns the date's month.
For example, if the following Date is declared in client code: public int getMonth()
Date d = new Date(9, 19);
// Returns the number of days
The following calls to the subtractWeeks method would // in this date's month.
modify the Date object's state as indicated in the comments. public int daysInMonth()
Remember that Date objects do not store the year. The date
before January 1st is December 31st. Date objects also ignore // Modifies this date's state
// so that it has moved forward
leap years.
// in time by 1 day, wrapping
Date d = new Date(9, 19); // around into the next month
d.subtractWeeks(1); // d is now 9/12 // or year if necessary.
d.subtractWeeks(2); // d is now 8/29 // example: 9/19 -> 9/20
d.subtractWeeks(5); // d is now 7/25 // example: 9/30 -> 10/1
d.subtractWeeks(20); // d is now 3/7 // example: 12/31 -> 1/1
d.subtractWeeks(110); // d is now 1/26
public void nextDay()
// (2 years prior)
8 of 8
Another Random Scribd Document
with Unrelated Content
The Project Gutenberg eBook of Ravished
Armenia
This ebook is for the use of anyone anywhere in the United States
and most other parts of the world at no cost and with almost no
restrictions whatsoever. You may copy it, give it away or re-use it
under the terms of the Project Gutenberg License included with this
ebook or online at www.gutenberg.org. If you are not located in the
United States, you will have to check the laws of the country where
you are located before using this eBook.
Translator: H. L. Gates
Language: English
RAVISHED ARMENIA
RAVISHED ARMENIA
THE STORY OF
AURORA MARDIGANIAN
THE CHRISTIAN GIRL WHO LIVED THROUGH
THE GREAT MASSACRES
INTERPRETED BY H. L. GATES
WITH A FOREWORD BY
NORA WALN
Copyright, 1918, by
Kingfield Press, Inc.
New York
MY DEDICATION
To each mother and father, in this beautiful land of the United
States, who has taught a daughter to believe in God, I dedicate my
book. I saw my own mother’s body, its life ebbed out, flung onto the
desert because she had taught me that Jesus Christ was my Saviour.
I saw my father die in pain because he said to me, his little girl,
“Trust in the Lord; His will be done.” I saw thousands upon
thousands of beloved daughters of gentle mothers die under the
whip, or the knife, or from the torture of hunger and thirst, or
carried away into slavery because they would not renounce the
glorious crown of their Christianity. God saved me that I might bring
to America a message from those of my people who are left, and
every father and mother will understand that what I tell in these
pages is told with love and thankfulness to Him for my escape.
The Latham,
New York City,
December, 1918. Aurora Mardiganian.
THIS STORY OF
AURORA MARDIGANIAN
which is the most amazing narrative ever written
has been reproduced
for the American Committee for
Armenian and Syrian Relief in a
“RAVISHED ARMENIA”
Through which runs the thrilling yet
tender romance of this
By the
American Committee for
ARMENIAN AND SYRIAN RELIEF
CONTENTS
CHAPTER PAGE
Acknowledgment 9
Foreword 11
Arshalus—The Light of the Morning 19
I When the Pasha Came to My House 29
II The Days of Terror Begin 47
III Vahby Bey Takes His Choice 64
IV The Cruel Smile of Kemal Effendi 80
V The Ways of the Zaptiehs 99
VI Recruiting for the Harems of Constantinople 116
VII Malatia—The City of Death 132
VIII In the Harem of Hadji Ghafour 145
IX The Raid on the Monastery 158
X The Game of the Swords, and Diyarbekir 174
XI “Ishim Yok; Keifim Tchok!” 191
XII Reunion—and Then, the Sheikh Zilan 208
XIII Old Vartabed and the Shepherd’s Call 223
XIV The Message of General Andranik 239
LIST OF ILLUSTRATIONS
The Long Line that Swiftly Grew Shorter Frontispiece
Map Showing Aurora’s Wanderings Page 75
Waiting They Know Not What Facing Page 158
Driven Forth on the Road of Terror ” ” 192
The Roadside of Awful Despair ” ” 234
ACKNOWLEDGMENT
For verification of these amazing things, which little Aurora told
me that I might tell them, in our own language, to all the world, I
am indebted to Lord Bryce, formerly British Ambassador to the
United States, who was commissioned by the British Government to
investigate the massacres; to Dr. Clarence Ussher, of whom Aurora
speaks in her story, and who witnessed the massacres at Van; and
to Dr. MacCallum, who rescued Aurora at Erzerum and made
possible her coming to America. You may read Aurora’s story with
entire confidence—every word is true. As the story of what
happened to one Christian girl, it is a proven document.
H. L. Gates.
FOREWORD
She stood beside me—a slight little girl with glossy black hair. Until
I spoke to her and she lifted her eyes in which were written the
indelible story of her suffering, I could not believe that she was
Aurora Mardiganian whom I had been expecting. She could not
speak English, but in Armenian she spoke a few words of greeting.
It was our first meeting and in the spring of last year. Several
weeks earlier a letter had come to me telling me about this little
Armenian girl who was to be expected, asking me to help her upon
her arrival. The year before an Armenian boy had come from our
relief station in the Caucasus and kind friends had made it possible
to send him to boarding school. I had formed a similar plan to send
Aurora to the same school when she should arrive.
We talked about education that afternoon, through her interpreter,
but she shook her head sadly. She would like to go to school, and
study music as her father had planned she should before the
massacres, but now she had a message to deliver—a message from
her suffering nation to the mothers and fathers of the United States.
The determination in the child’s eyes made me ask her her age and
she answered “Seventeen.”
Tired, and worn out nervously, as she was, Aurora insisted upon
telling us of the scenes she had left behind her—massacres, families
driven out across the desert, girls sold into Turkish harems, women
ravished by the roadside, little children dying of starvation. She
begged us to help her to help her people. “My father said America
was the friend of the oppressed. General Andranik sent me here
because he trusted you to help me,” she pleaded.
And so her story was translated. Sometimes there had to be
intervals of rest of several days, because her suffering had so
unnerved her. She wanted to keep at it during all the heat of the
summer, but by using the argument that she would learn English, we
persuaded her to go to a camp off the coast of Connecticut for three
weeks.
You who read the story of Aurora Mardiganian’s last three years,
will find it hard to believe that in our day and generation such things
are possible. Your emotions will doubtless be similar to mine when I
first heard of the suffering of her people. I remember very distinctly
my feelings, when, early in October of 1917, I attended a luncheon
given by the Executive Committee of the American Committee for
Armenian and Syrian Relief, to a group of seventeen American
Consuls and missionaries who had just returned from Turkey after
witnessing two years of massacre and deportation. I listened to
persons, the truthfulness of whose statements I could not doubt, tell
how a church had been filled with Christian Armenians, women and
children, saturated with oil and set on fire, of refined, educated girls,
from homes as good as yours or mine, sold in the slave markets of
the East, of little children starving to death, and then to the plea for
help for the pitiful survivors who have been gathered into temporary
relief stations.
I listened almost unable to believe and yet as I looked around the
luncheon table there were familiar faces, the faces of men and
women whose word I could not doubt—Dr. James L. Barton,
Chairman of the American Committee for Armenian and Syrian
Relief, Ambassadors Morgenthau and Elkus, who spoke from
personal knowledge, Cleveland H. Dodge, whose daughter, Mrs.
Elizabeth Huntington is in Constantinople, and whose son is in
Beirut, both helping with relief work, Miss Lucille Foreman of
Germantown, C. V. Vickrey, Executive Secretary of the American
Committee for Armenian and Syrian Relief, Dr. Samuel T. Dutton of
the World Court League, George T. Scott, Presbyterian Board of
Foreign Missions, and others.
And you who read this story as interpreted will find it even harder
to believe than I did, because you will not have the personal
verification of the men and women who can speak with authority
that I had at that luncheon. Since then it has happened that nearly
every communication from the East—Persia, Russian Caucasus and
the Ottoman Empire, has passed through my hands and I know that
conditions have not been exaggerated in this book. In this
introduction I want to refer you to Lord Bryce’s report, to
Ambassador Morgenthau’s Story, to the recent speeches of Lord
Cecil before the British Parliament, and the files of our own State
Department, and you will learn that stories similar to this one can be
told by any one of the 3,950,000 refugees, the number now
estimated to be destitute in the Near East.
This is a human living document. Miss Mardiganian’s names, dates
and places, do not correspond exactly with similar references to
these places made by Ambassador Morgenthau, Lord Bryce and
others, but we must take into consideration that she is only a girl of
seventeen, that she has lived through one of the most tragic periods
of history in that section of the world which has suffered most from
the war, that she is not a historian, that her interpreter in giving this
story to the American public has not attempted to write a history. He
has simply aimed to give her message to the American people that
they may understand something of the situation in the Near East
during the past years, and help to establish there for the future, a
sane and stable government.
Speaking of the character of the Armenians, Ambassador
Morgenthau says in a recent article published in the New York
Evening Sun: “From the times of Herodotus this portion of Asia has
borne the name of Armenia. The Armenians of the present day are
the direct descendants of the people who inhabited the country
3,000 years ago. Their origin is so ancient that it is lost in fable and
mystery. There are still undeciphered cuneiform inscriptions on the
rocky hills of Van, the largest Armenian city, that have led certain
scholars—though not many, I must admit—to identify the Armenian
race with the Hittites of the Bible. What is definitely known about the
Armenians, however, is that for ages they have constituted the most
civilized and most industrious race in the Eastern section of the
Ottoman Empire. From their mountains they have spread over the
Sultan’s dominions, and form a considerable element in the
population of all the large cities. Everywhere they are known for
their industry, their intelligence and their decent and orderly lives.
They are so superior to the Turks intellectually and morally that
much of the business and industry has passed into their hands. With
the Greeks, the Armenians constituted the economic strength of the
Empire. These people became Christians in the fourth century and
established the Armenian Church as their state religion. This is said
to be the oldest Christian Church in existence.
“In face of persecutions which have had no parallel elsewhere,
these people have clung to their early Christian faith with the utmost
tenacity. For 1,500 years they have lived there in Armenia, a little
island of Christians, surrounded by backward peoples of hostile
religion and hostile race. Their long existence has been one
unending martyrdom. The territory which they inhabit forms the
connecting link between Europe and Asia, and all the Asiatic
invasions—Saracens, Tartars, Mongols, Kurds and Turks—have
passed over their peaceful country.”
Aurora Mardiganian has come to America to tell the story of her
suffering peoples and to do her part in making it possible for her
country to be rebuilt. She is only a little girl, but in giving her story
to the American people through the daily newspapers, in this book,
and the motion picture which is being prepared for that purpose by
the American Committee for Armenian and Syrian Relief, she is, I
feel, playing one of the greatest parts in helping to reëstablish again
“peace on earth, good will to men” in ancient Bible Lands, the home
in her generation of her people. Her mother, her father, her brothers
and sisters are gone, but according to the most careful estimates,
3,950,000 destitute peoples, mostly women and children who had
been driven many of them as far as one thousand miles from home,
turn their pitiful faces toward America for help in the reconstructive
period in which we are now living.
Dr. James L. Barton, who is leaving this month with a commission
of two hundred men and women for the purpose of helping to
rehabilitate these lands from which Aurora came, is a part of the
answer to the call for help from these destitute people. The
American Committee for Armenian and Syrian Relief Campaign for
$30,000,000, in which it is hoped all of the people of America will
participate, is another part of the answer.
You who read this book can play a part also in helping Aurora to
deliver her message, by passing it on to some one else when you
have finished with it.
December 2, 1918
One Madison Ave., New York Nora Waln,
Publicity Secretary,
American Committee for
Armenian and Syrian Relief.
ARSHALUS—THE LIGHT OF THE
MORNING
A Prologue to the Story