Download full Introduction to Programming Using Visual Basic 10th Edition Schneider Test Bank all chapters
Download full Introduction to Programming Using Visual Basic 10th Edition Schneider Test Bank all chapters
https://testbankdeal.com/product/introduction-to-programming-using-
visual-basic-10th-edition-schneider-solutions-manual/
https://testbankdeal.com/product/introduction-to-programming-using-
visual-basic-2012-9th-edition-schneider-test-bank/
https://testbankdeal.com/product/introduction-to-programming-using-
visual-basic-2012-9th-edition-schneider-solutions-manual/
https://testbankdeal.com/product/organizational-behavior-18th-edition-
robbins-solutions-manual/
Food and Culture 7th Edition Sucher Solutions Manual
https://testbankdeal.com/product/food-and-culture-7th-edition-sucher-
solutions-manual/
https://testbankdeal.com/product/principles-of-macroeconomics-7th-
edition-gregory-mankiw-solutions-manual/
https://testbankdeal.com/product/financial-accounting-a-critical-
approach-canadian-4th-edition-friedlan-test-bank/
https://testbankdeal.com/product/seeing-young-children-a-guide-to-
observing-and-recording-behavior-6th-edition-bentzen-test-bank/
https://testbankdeal.com/product/matching-supply-with-demand-an-
introduction-to-operations-management-3rd-edition-cachon-solutions-
manual/
Bensons Microbiological Applications Laboratory Manual
Complete Version 14th Edition Brown Solutions Manual
https://testbankdeal.com/product/bensons-microbiological-applications-
laboratory-manual-complete-version-14th-edition-brown-solutions-
manual/
Chapter 7 Arrays
1. After the following Dim statement is executed, how many elements will the array myVar
have?
Dim myVar(7) As Double
(A) 0
(B) 1
(C) 8
(D) 9
C
4. In the statement
Dim scores(30) As Double
the Count method is used to carry out which of the following tasks?
(A) determine the largest value for each of the elements
(B) determine the largest subscript in the array
(C) determine the smallest value for each of the elements
(D) declare a new array with the name Count
B
8. The ReDim statement causes an array to lose its current contents unless the word ReDim is
followed by the keyword
(A) CInt
(B) MyBase
(C) Preserve
(D) Add
C
9. Like other variables, array variables can be declared and assigned initial values at the same
time. (T/F)
T
10. After an array has been declared, its type (but not its size) can be changed with a ReDim
statement. (T/F)
F
11. If you use the ReDim statement to make an array smaller than it was, data in the eliminated
elements can be retrieved by using the Preserve keyword. (T/F)
F
13. What will be the size of the array stones after the following two lines of code are executed?
Dim stones() As String = {"Watts", "Jagger", "Wood", "Richards"}
ReDim Preserve stones(10)
11
is used to declare an array where each element has the value 10. (T/F)
F
17. What two names are displayed in the list box when the button is clicked on?
Dim krispies(2) as String
19. Either a For...Next loop or a For Each loop can be used to display every other value from an
array in a list box. (T/F)
F
20. An array can contain both numeric and string values. (T/F)
F
21. A Function procedure can return a number, but cannot return an array of numbers. (T/F)
F
22. What names are displayed in the list box when the button is clicked on?
Private Sub btnDisplay_Click(...) Handles btnDisplay.Click
Dim names() As String = IO.File.ReadAllLines("Data.txt")
lstBox.Items.Clear()
For i As Integer = (names.Count - 1) To 0 Step -2
lstBox.Items.Add(names(i))
Next
End Sub
Assume the five lines of the file Data.txt contain the following entries: Bach, Borodin,
Brahms, Beethoven, Britain.
(A) Bach, Brahms, and Britain
(B) Britain, Beethoven, Brahms, Borodin, and Bach
(C) Bach, Borodin, Brahms, Beethoven, and Britain
(D) Britain, Brahms, and Bach
D
24. What numbers are displayed in the list box when the button is clicked on?
Private Sub btnDisplay_Click(...) Handles btnDisplay.Click
Dim file As String = "Beatles.txt"
Dim fabFour() As String = FillArray(file)
lstBox.Items.Add(Array.IndexOf(fabFour, "Ringo")
lstBox.Items.Add(fabFour.Count - 1)
End Sub
Assume the four lines of the file Beatles.txt contain the following entries: John, Paul, Ringo,
George.
(A) 3 and 3
(B) 3 and 4
(C) 2 and 3
(D) 2 and 4
C
26. What numbers are displayed in the list box by the following program segment?
Dim numbers As String = "1492,1776,1945"
Dim temp() As String = numbers.Split(","c)
Dim nums(2) As Integer
For i As Integer = 0 to 2
nums(i) = CInt(temp(i))
Next
lstBox.Items.Add(nums(1))
lstBox.Items.Add(nums.First)
(A) 10000
(B) 11110
(C) 1110
(D) 0
B
30. Given the Dim statement below, which set of statements will initialize all elements of
myArray to 100?
Dim myArray(100) As Double
34. Consider the following Dim and assignment statements for myArray(). The assignment
statement will cause a "Subscript out of range" error. (T/F)
Dim myArray(50) As Double
myArray(34) = 51
F
35. Unless otherwise specified, Visual Basic assigns the value 0 to each element of a numeric
array when it is declared with a Dim statement. (T/F)
T
39. Which of the tasks is the Join function used to carry out in the following statement?
Dim line As String
line = Join(strArrData, ",")
(A) Join concatenates the values of all elements of the array strArrData, and adds a comma
delimiter between successive values.
(B) Join concatenates the values of all elements of line, and adds a comma to the end of the
line.
(C) Join parses or separates out all items of text that are delimited by a comma in
strArrData.
(D) Join parses or separates out all items of text that are delimited by a comma in line.
A
2. What numbers are displayed in the list box by the following program segment?
Dim numbers() As Integer = {4, 7, 9, 3, 1}
Dim query = From number in numbers
Where number > 6
Select number
lstBox.Items.Add(query.Count)
lstBox.Items.Add(query.Average)
(A) 5 and 12
(B) 2 and 12
(C) 2 and 8
(D) 5 and 8
C
3. What numbers are displayed in the list box by the following program segment?
Dim numbers() As Integer = {4, 7, 9, 3, 1, 9, 7}
Dim query = From number in numbers
Where number > 6
Select number
lstBox.Items.Add(query.Count)
lstBox.Items.Add(query.Average)
(A) 7 and 12
(B) 4 and 8
(C) 2 and 12
(D) 7 and 8
B
5. What states are displayed in the list box by the following program segment?
Dim states() As String = {"Colorado", "New Mexico", "Arizona", "Utah"}
Dim query = From state in states
Where ContainsE(state)
Select state
For Each state in query
lstBox.Items.Add(state)
Next
(A) Utah
(B) COLORADO, NEW MEXICO, ARIZONA, UTAH
(C) UTAH
(D) No states
C
7. What numbers are displayed in the list box by the following program segment?
Dim states() As String = {"Colorado", "New Mexico", "Arizona", "Utah"}
Dim query = From state in states
Where state.EndsWith("o")
Select state.Length
For Each number in query
lstBox.Items.Add(number)
Next
(A) 8 and 10
(B) 8, 10, 7, 4
(C) 8
(D) 29
A
8. What names are displayed in the list box by the following program segment?
Dim tonightShow() As String = {"Allen", "Parr", "Carson", "Leno",
"O'Brien", "Leno"}
Dim query = From host in tonightShow
Where host.Length = 4
Select host
Distinct
For Each host in query
lstBox.Items.Add(host)
Next
10. What years are displayed in the list box by the following program segment?
Dim years() As Integer = {1492, 1776, 1840, 1929, 1945, 2005}
Dim query = From year in years
Where Is20thCentury(year)
Select year
For Each yr in query
lstBox.Items.Add(yr)
Next
12. What words are displayed in the list box by the following program segment?
Dim deadlySins() As String = {"pride", "greed", "anger", "envy",
"lust", "gluttony", "sloth"}
Dim query = From sin in deadlySins
Order By sin Ascending
Where sin.StartsWith("g")
Select sin
lstBox.Items.Add(query.First)
lstBox.Items.Add(query.Max)
13. What words are displayed in the list box by the following program segment?
Dim deadlySins() As String = {"pride", "greed", "anger", "envy",
"lust", "gluttony", "sloth"}
Dim query = From sin in deadlySins
Order By sin.Length Descending
Select sin.ToUpper
lstBox.Items.Add(query.First)
lstBox.Items.Add(query.Min)
5
An Historic Blunder
The Southern gentry made a thumping mistake when, after the Civil
War, they disfranchised the blacks. Had they permitted the latter to
vote, they would have retained political control of all the Southern
States, for the blacks, like the peasants everywhere else, would
have followed their natural masters. As it was, control quickly passed
to the poor white trash, who still maintain it, though many of them
have ceased to be poor. The gentry struggle in vain to get back in
the saddle; they lack the votes to achieve the business unaided, and
the blacks, who were ready to follow them in 1870, are now incurably
suspicious of them. The result is that politics in the South remain
fathomlessly swinish. Every civilized Southerner knows it and is
ashamed of it, but the time has apparently passed to do anything
about it. To get rid of its Bleases, Mayfields, Slemps, Peays and
Vardamans, the South must wait until the white trash are themselves
civilized. This is a matter demanding almost as much patience as the
long vigil of the Seventh Day Adventists.
6
On Cynicism
One of the most curious of human delusions lies in the theory that
cynics are unhappy men—that cynicism makes for a general
biliousness and malaise. It is a false deduction, I believe, from the
obvious fact that cynics make other men unhappy. But they are
themselves among the most comfortable and serene of mammals;
perhaps only bishops, pet dogs and actors are happier. For what a
cynic believes, though it may be too dreadful to be put into formal
words, at least usually has the merit of being true—and truth is ever
a rock, hard and harsh, but solid under the feet. A cynic is chronically
in the position of a wedding guest who has known the bride for nine
years, and has had her confidence. He is a great deal less happy,
theoretically, than the bridegroom. The bridegroom, beautifully
barbered and arrayed, is about to launch into the honeymoon. But
the cynic looks ahead two weeks, two months, two years. Such, to
borrow a phrase from the late Dr. Eliot, are the durable satisfactions
of life.
7
Music and Sin
Among Christian workers and other intellectual cripples the delusion
seems to persist that jazz is highly aphrodisiacal. I never encounter a
sermon on the subject without finding it full of dark warnings to
parents, urging them to keep their nubile daughters out of the jazz
palaces on the ground that the voluptuous music will inflame their
passions and so make them easy prey to bond salesmen, musicians
and other such carnal fellows. All this seems to me to be nonsense.
Jazz, in point of fact, is not voluptuous at all. Its monotonous rhythm
and puerile tunes make it a sedative rather than a stimulant. If it is an
aphrodisiac, then the sound of riveting is also an aphrodisiac. What
fetches the flappers who come to grief in the jazz parlors is not the
music at all, but the alcohol. Drinking it out of flasks in the
washrooms, they fail to keep the dose in harmony with their natural
resistance, and so they lose control of their faculties, and what
follows is lamentable. Jazz, which came in with Prohibition, gets the
blame that belongs to its partner. In the old days, when it was
uncommon for refined women to get drunk at dances, it would have
been quite harmless. To-day even Chopin’s funeral march would be
dangerous.
The truth is that jazz is probably the least voluptuous variety of music
commonly heard in Christendom. There are plenty of Methodist
hymns that are ten times as aphrodisiacal, and the fact is proved by
the scandals that follow every camp-meeting. In most parts of the
United States, indeed, the Methodists have begun to abandon camp-
meetings as subversive of morality. Where they still flourish it is not
unusual for even the rev. clergy to be taken in byzantine practices.
But so-called good music is yet worse than the Methodist hymns.
Has the world so soon forgotten James Huneker’s story of the
prudent opera mamma who refused to let her daughter sing Isolde,
on the ground that no woman could ever get through the second act
without forgetting God? That second act, even so, is much
overestimated. There are piano pieces of Chopin that are a hundred
times worse; if the Comstocks really had any sense, they would
forbid their performance. And what of the late Puccini? If “La
Bohème” is not an aphrodisiac, then what is it? Yet it is sung publicly
all over the world. Only in Atlanta, Ga., is there a law against it, and
even that law was probably inspired by the fact that it was written by
a Catholic and not by the fact that it has brought hundreds of
thousands of Christian women to the edge of the abyss.
Old Ludwig himself was not without guilt. His “Egmont” overture is a
gross and undisguised appeal to the medulla oblongata. And what of
his symphonies and quartettes? The last movement of his Eroica is
not only voluptuous to the last degree; it is also Bolshevistic. Try to
play it with your eyes on a portrait of Dr. Coolidge. You will find the
thing as impossible as eating ice-cream on roast beef. At the time of
its first performance in Vienna the moral sense of the community
was so greatly outraged that Beethoven had to get out of town for a
while. I pass over Wagner, whose “Tristan und Isolde” was probably
his most decorous work, despite Huneker—think of “Parsifal”!—and
come to Richard Strauss. Here I need offer no argument: his
“Salomé” and “Elektra” have been prohibited by the police, at one
time or another, in nearly every country in the world. I believe that
“Der Rosenkavalier” is still worse, though the police leave it
unmolested. Compare its first act to the most libidinous jazz ever
heard of on Broadway. It is like comparing vodka to ginger-pop. No
woman who hears it is ever the same again. She may remain within
the law, but her thoughts are wayward henceforth. Into her ear the
sirens have poured their abominable song. She has been beset by
witches. There is a sinister glitter in her eye.
8
The Champion
Of the forty-eight sovereign States of this imperial Federation, which
is the worst? In what one of them is a civilized man most
uncomfortable? Over half the votes, if the question were put to a
vote, would probably be divided between California and Tennessee.
Each in its way, is almost unspeakable. Tennessee, of course, has
never been civilized, save in a small area; even in the earliest days
of the Republic it was regarded as barbaric by its neighbors. But
California, at one time, promised to develop a charming and
enlightened civilization. There was a touch of tropical balm in its air,
and a touch of Latin and oriental color in its ideas. Like Louisiana, it
seemed likely to resist Americanization for many years; perhaps
forever. But now California, the old California, is simply extinct. What
remains is an Alsatia of retired Ford agents and crazy fat women—a
paradise of 100% Americanism and the New Thought. Its laws are
the most extravagant and idiotic ever heard of in Christendom. Its
public officers, and particularly its judges, are famous all over the
world for their imbecilities. When one hears of it at all, one hears that
some citizen has been jailed for reading the Constitution of the
United States, or that some new swami in a yellow bed-tick has got
all the realtors’ wives of Los Angeles by the ears. When one hears of
it further, it is only to learn that some obscure movie lady in
Hollywood has murdered another lover. The State is run by its
Chambers of Commerce, which is to say, by the worst variety of
resident shysters. No civilized man ever seems to take any part in its
public life. Not an idea comes out of it—that is, not an idea beyond
the grasp of a Kiwanis Club secretary, a Christian Science sorcerer,
or a grand goblin of the American Legion. Twice, of late, it has
offered the country candidates for the presidency. One was the Hon.
Hiram Johnson and the other was the Hon. William Gibbs McAdoo!
Only Vermont can beat that record.
The minority of civilized Californians—who lately, by the way, sent
out a call from Los Angeles for succor, as if they were beset by
wolves!—commonly lay the blame for this degeneration of a once-
proud commonwealth upon the horde of morons that has flowed in
from Iowa, Nebraska and the other cow-States, seeking relief from
the bitter climate of the steppes. The California realtors have been
luring in these hinds for a generation past, and they now swarm in all
the southern towns, especially Los Angeles. They come in with their
savings, are swindled and sent home, and so make room for more.
While they remain and have any part of their money left, they
patronize the swamis, buy oil stock, gape at the movie folk, and pack
the Methodist churches. Unquestionably, the influence of such
vacuums has tended to degrade the general tone of California life;
what was once a Spanish fiesta is now merely an upper Mississippi
valley street-carnival. But it is not to be forgotten that the Native
Sons have gone down the chute with the newcomers—that there is
no more sign of intellectual vigor in the old stock than there is in the
new stock. A few intransigeants hold out against the tide of 100%
Americanism, but only a few. The rest bawl against the Reds as
loudly as any Iowa steer-stuffer.
The truth is that it is unjust to blame Iowa for the decay of California,
for Iowa itself is now moving up, not down. And so is Nebraska. A
few years ago both States were as sterile, intellectually, as Spain,
but both are showing signs of progress to-day, and in another
generation or two, as the Prohibition lunacy passes and the pall of
Methodism begins to lift, they will probably burst into very vigorous
activity. Some excellent stock is in them; it is very little contaminated
by what is called Anglo-Saxon blood. Iowa, even to-day, is decidedly
more civilized than California. It is producing more ideas, and, more
important still, it is carrying on a much less violent war against ideas.
I doubt that any man who read the Constitution in Davenport or Des
Moines would be jailed for it, as Upton Sinclair (or one of his friends)
was in Pasadena. The American Legion would undoubtedly protest,
but the police would probably do nothing, for the learned judges of
the State would not entertain the charge.
Thus California remains something of a mystery. The whole United
States, of course, has been going downhill since the beginning of the
century, but why should one State go so much faster than the
others? Is the climate to blame? Hardly. The climate of San
Francisco is thoroughly un-Californian, and yet San Francisco is
almost as dead as Los Angeles. It was there, indeed, that that
California masterpiece, the Mooney case, was staged; it was here
that the cops made three efforts to convict poor Fatty Arbuckle of
murder in the first-degree; it was there that the late Dr. Abrams
launched a quackery that went Mother Eddy one better. San
Francisco, once the home of Mark Twain and Bret Harte, is now
ravaged by Prohibition enforcement officers. But if the climate is not
to blame, then what is? Why should a great State, lovely physically
and of romantic history, so violently renounce all sense and
decency? What has got into it? God alone knows!
9
Honor in America
Some time ago I enjoyed the distinguished honor of entertaining an
American university professor in my house. The fellow had a resilient
gullet, and in the course of the evening we got down a quart of
Scotch. Made expansive by the liquor, he told me this story:
A short while before, at his university, one of the professors gave a
booze party for a group of colleagues, including the president of the
institution. It was warm weather, and they sat on the veranda,
guzzling moonshine and ginger-ale. There was so much chatter that
they didn’t hear a student coming up the path. Suddenly he was on
them, and they almost fainted....
At this point I asked why they were alarmed.
“Well,” said my visitor, “suppose the student had turned out to be a
Christian? He would have blabbed, and then our host would have
lost his chair. The president would have been forced to cashier him.”
“But the president,” I argued, “was a guest in the man’s house. How
could he have dismissed him?”
“What else would there have been for him to do?” asked the
professor.
“Resign at once,” I replied. “Wasn’t he under the obligations of a
guest? Wasn’t he particeps criminis? How could he separate himself
from his host? How could he sit as judge upon his host, even if only
formally?”
But the professor couldn’t see the point. I began to fear that he was
in his cups, but it soon appeared that he was quite clear. We argued
for half an hour: he was still unable to see the point. The duty of a
president to enforce an unwilling and dishonest obedience to an
absurd law—this duty was superior to his duty as a guest, i. e., it was
superior to his obligation as a man of honor! We passed on to
another point.
“What of the student?” I asked. “I take it that he turned out to be a
gentleman. Suppose he had been a Christian? Suppose he had
blabbed? What would the other boys have done to him?”
The professor stared at me blankly.
“Nothing,” he said at length. “After all, we were boozing.”
This professor, I should add, was a man of the old American stock—
in fact, a fellow very proud of his colonial ancestry. When he got
back to his university he joined in signing a public statement that
Prohibition was a great success there.
I proceed to another case. One day in the Summer of 1924, during
the Republican National Convention at Cleveland, I met an eminent
American publicist in a hotel lobby there. He told me at once that he
was suffering from a dreadful bellyache. I had a jug in my room, but
my own hotel was far away, so I suggested that help might be got
from a journalist on the premises. We went to his room, and I
introduced the publicist. The journalist promptly got out a bottle and
gave him a policeman’s drink. The publicist had recovered in three
minutes.... When he got home, he joined, like the professor, in
signing a public statement praising Prohibition.
10
Note in the Margin of a Treatise on Psychology
As I stoop to lace my shoe you hit me over the coccyx with a length
of hickory (Carya laciniosa). I conclude instantly that you are a
jackass. This is a whole process of human thought in little. This also
is free will.
11
Definition
Democracy is that system of government under which the people,
having 35,717,342 native-born adult whites to choose from, including
thousands who are handsome and many who are wise, pick out a
Coolidge to be head of the State. It is as if a hungry man, set before
a banquet prepared by master cooks and covering a table an acre in
area, should turn his back upon the feast and stay his stomach by
catching and eating flies.
XVIII. CATECHISM
Q. If you find so much that is unworthy of reverence in the United
States, then why do you live here?
A. Why do men go to zoos?
INDEX
Abbott, Wilbur C., 152
American Mercury, 120, 127, 141, 146, 152, 164, 169, 172
Anti-Saloon League, 23, 106, 111, 113, 148, 229, 268, 269
Aristotle, 24
Broom, 169
Bryan, William Jennings, 64 ff., 86, 112, 131, 155, 204, 230
Chopin, F. F., 87
Coca-cola, 77 ff.
Comstockery, 15 ff., 98
Denmark, 33
Dial, 170
Dreiser, Theodore, 16, 21, 43, 57, 128, 157, 180, 194
German Army, 31
Haydn, Josef, 88
Homo neandertalensis, 64
Mendelssohn, Felix, 90
Mississippi, 160
Nobel Prize, 41
Raulston, Judge, 86
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
testbankdeal.com