Introduction to Programming Using Visual Basic 10th Edition Schneider Test Bank instant download
Introduction to Programming Using Visual Basic 10th Edition Schneider Test Bank instant download
https://testbankdeal.com/product/introduction-to-programming-
using-visual-basic-10th-edition-schneider-test-bank/
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)
a rule which still holds good in society. We are well aware of the
ingredients of the dish which our Bible translators have still
bequeathed to us as ‘a mess of potage.’ In its present corrupted
form of ‘porridge’ this notion of a mess rather than of a soup is still
preserved. Another interesting servitorship of this class has well-nigh
escaped our notice—that of the hastiler: he who turned the haste or
spit. In the Close Rolls we find a ‘Thurstan le Hastler’ recorded, and
in the Parliamentary Writs such names as ‘Henry Hastiler’ and
‘William Hastiler.’ In the will of Humphrey de Bohun, Earl of Essex,
among other household servants, such as potager, ferour, barber,
ewer, is mentioned ‘William de Barton, hastiler.’ I need not remind
Lancashire people that a haister, or haster, is still the term used for
the tin screen employed for roasting purposes. The memorials of this
interesting servitorship still linger on in our ‘Hastlers,’ ‘Haslers,’ and
‘Haselers.’ If, however, the supervision of the roasting and basting
required an attendant, none the less was it so with the washing-up
department. How familiarly does such a term as ‘scullery’ fall from
our lips, and how little do many of us know of its history. An
escuelle[196] was a porringer or dish, and a scullery was a place
where such vessels were stored after being washed.[197] Hence a
‘squiller’ or ‘squyler’ was he who looked to this; our modern
‘scullion,’ in fact, which is but a corrupted form of the same word. In
one of Robert of Brunne’s poems, we find him saying—
And the squyler of the kechyn,
Piers, that hath woned (dwelt) here yn.[198]
In a book of ‘Ordinances and Regulations’ we find mention made
even of a ‘sergeant-squylloure.’ Doubtless his duty was to look after
the carriage of utensils at such times as his lord made any extended
journey, or to superintend the washing of cup and platter after the
open-board festivities which were the custom of early baronial
establishments. To provide for every retainer who chanced to come
in would be, indeed, a care. The occurrence of a ‘Roger de
Norhamtone, Squyler,’ however, in the London City rolls, seems to
imply that occasionally the sale of such vessels gave the title. I
cannot say the name is obsolete, as I have met with one ‘Squiller;’
and ‘Skiller,’ which would seem to be a natural corruption, is not
uncommon. Our ‘Spencers,’ abbreviated from ‘despencer,’ had an
important charge—that of the ‘buttery,’ or ‘spence,’ the place where
the household store was kept. The term is still in use, I believe, in
our country farm-houses. In the ‘Sumner’s Tale’ the glutton is well
described as—
All vinolent as botel in the spence;
and Mr. Halliwell, I see, with his wonted research, has lighted on the
following lines:—
Yet I had lever she and I
Were both togyther secretly
In some corner in the spence.[199]
‘De la Spence,’ as well as ‘le Spencer,’ has impressed itself upon our
living nomenclature. Our ‘Panters,’ ‘Pantlers,’ and ferocious-seeming
‘Panthers,’ descendants of such folk as ‘Richard le Panter,’ or ‘Robert
le Paneter,’ or ‘Henry de le Paneterie,’ are but relics of a similar
office. They had the superintendence of the ‘paneterie,’ or pantry;
literally, of course, the bread closet. It seems, however, early to have
become used in a wider and more general sense. In the Household
Ordinances of Edward IV. one of the sergeants is styled ‘the chief
Pantrer of the King’s mouth.’ John Russel in his ‘Boke of Nurture’
thus directs his student—
The furst yere, my son, thou shalt be pantere or buttilare,
Thou must have three knyffes kene in pantry, I sey thee, evermare,
One knyfe the loaves to choppe, another them for to pare,
The third, sharp and kene, to smothe the trenchers and square.[200]
that of him
Achatours mighten take ensample.
Another term for the same made its mark upon our nomenclature as
‘Gustur’ (‘Robert le Gustur,’ T.) To gust was thus used till
Shakespeare’s day, and we still speak of ‘gusto’ as equivalent to
relish.
We are reminded by the fact of the existence of ‘Knifesmith’ and
‘Spooner’ only among our early occupative surnames that there were
no forks in those days.[208] There is no ‘Forker’ to be found. Even the
‘Carver’ (‘Adam le Kerver,’ A., ‘Richard le Karver,’ A.) had to use his
fingers. In the ‘Boke of Kervynge,’ a manual of the then strictest
etiquette in such matters, we find the following direction:—‘Set
never on fyshe, flesche, beest, ne fowle, more than two fyngers and
a thombe.’ Seldom, too, did they use plates as we now understand
them. Before each guest was set a round slice of bread called a
trencher, and the meat being placed upon this, he consumed the
whole, or as much as he pleased. Under these circumstances we can
easily understand how necessary would be the office of ‘Ewer,’ a
name found in every early roll as ‘Brian le Ewer,’ or ‘Richard le
Ewere,’ or ‘Adam de la Euerie.’ As he supplied water for each to
cleanse his hands he was close followed by the ‘napper’ or ‘napier,’
who proffered the towel or napkin. The word, I need scarcely say, is
but a diminutive of the old nape, which was applied in general to the
tablecloths and other linen used in setting forth the dinner. An old
book, which I have already quoted, in directing the attendant how to
lay the cloth, says—
The over nape schall double be layde.
The Hundred Rolls and other records furnish us with such names as
‘Jordan le Nappere,’ or ‘John le Napere,’ or ‘Walter de la Naperye.’
Behind the lord of the board, nigh to his elbow, stood the ‘page,’
holding his cup. This seems to have been an office much sought
after by the sons of the lower nobility, and it is to the honourable
place in which it was held we no doubt owe the fact that not merely
are our ‘Pages’ decidedly numerous in the present day, but that we
also find such further particular compounds as ‘Small-page,’[209]
‘Little-page,’ or ‘Cup-page’ holding anything but a precarious
existence in our midst. There seems to have been but little
difference between this office and that of the ‘henchman,’ only that
the latter, as his name, more strictly written ‘haunchman,’ shows,
attended his master’s behests out of doors. He, too, lives on hale
and hearty in our ‘Henchmans,’ ‘Hinxmans,’ ‘Hincksmans,’ and
‘Hensmans.’[210]
In several of our early records of names we find ‘Peter le Folle,’
‘Alexander le Fol,’ and ‘Johannes Stultus’ appearing in apparently
honest and decent company. The old fool or jester was an important
entity in the retinue of the mediæval noble. He could at least say, if
he might not do, what he liked, and I am afraid the more ribald his
buffoonery the greater claim he possessed to be an adept in his
profession in the eyes of those who heard him. His dress was always
in character with his duties, being as uncouth as fashion reversed
could make it. In his hand he bore a mock rod of state, his head was
surmounted by a huge cap peaked at the summit and surrounded
with little jingling bells, his dress was in colour as conflicting as
possible, and the tout ensemble I need not dwell upon. We still talk
of a ‘foolscap,’ and even our paper has preserved the term from the
fact that one of the earliest watermarks we have was that of a fool’s
cap with bells. ‘Fools,’ I need not say, wherever else to be met with,
are now obsolete so far as our directories are concerned.
I have just mentioned the henchman. This at once carries us
without the baronial walls, and in whatever scene we are wont to
regard the early suzeraine as engaging, it is remarkable how fully
marked is our nomenclature with its surroundings. Several useful
servitorships, however, claim our first attention. In such days as
these, when the telegraph wire was an undreamt-of mystery, and
highways traversed by steam-engines would have been looked upon
as something supernatural indeed, we can readily understand the
importance of the official ‘Roger le Messager,’ or ‘John le Messager,’
nor need we be surprised by the frequency with which he is met. In
the ‘Man of Lawes Tale’ it is said—
This messager to don his avantage
Unto the Kinges mother rideth swift.
How familiar a term it must have been in the common mouth the
frequency with which the name is met fully shows.
Our ‘Slingers’ represent an all but forgotten profession, but they
seem to have been useful enough in their day and generation. The
sling was always attached to a stick, whence the old term ‘staffsling.’
Lydgate describes David as armed
With a staffe slynge, voyde of plate and mayle;
But we must not forget old England’s one boast, her archers, and
our last quotation fitly brings them to our notice. They, too, in the
battle-field and in the rural list, maintained alike their supremacy. If
we would be proud of our early victories, we must ever look with
veneration on the bow. ‘Bowman’ and ‘Archer’ still represent the
more military professional, but not alone. Even more interesting, as
speaking for the more specific crossbow or ‘arbalist,’ are our
‘Alabasters,’ ‘Arblasters,’ ‘Arblasts,’ and ‘Balsters.’ In Robert of
Gloucester’s description of the reign of the Conqueror, it is said—
So great power of this land and of France he nom (took)
With him into England, of knights and squires,
Spearmen anote, and bowemen, and also arblasters.
Chaucer, too, describing a battlement, says—
And eke within the castle were
Springoldes, gonnes, bowes, and archers,
And eke about at corners
Men seine over the wall stand
Grete engines, who were nere hand,
And in the kernels, here and there,
Of arblasters great plentie were.
The fletcher, or fledger as I had well-nigh called him, spent his time,
in fact, in feathering arrows.
Skelton in ‘The Maner of the World’ says:—
So proude and so gaye,
So riche in arraye,
And so skant of mon-ey
Saw I never:
So many bowyers,
So many fletchers,
And so few good archers
Saw I never.
While all these names, however, speak for specific workmanship, our
‘Flowers’ represent a more general term. We are told of Phœbus in
the ‘Manciples Tale,’ that
His bowe he bent, and set therein a flo.
But these are not all. It is with them we must associate our ancestral
‘Woodwards’ or ‘Woodards,’ and still more common ‘Woodreefs,’
‘Woodrows,’ ‘Woodroffs,’ and ‘Woodruffs,’ all more or less perverted
forms of the original wood-reeve.[226] A song representing the
husbandmen as complaining of the burdens in Edward II.’s reign
says—
The hayward heteth us harm to habben of his
The bailif beckneth us bale, and weneth wel do;
The wodeward waiteth us wo.
All these officers were more or less of legal capacity, men whose
duty it was, bill in hand, to guard the vert and venison under their
charge,[227] to act as agents for their lord in regard to the pannage of
hogs, to look carefully to the lawing of dogs, and in case of offences
to present them to the verderer at the forest assize. The ‘Moorward,’
found in our early records as ‘German le Morward’ or ‘Henry le
Morward,’ guarded the wilder and bleaker districts. ‘The Rider,’
commonly found as ‘Roger le Rydere’ or ‘Ralph le Ryder,’ in virtue of
having a larger extent of jurisdiction, was mounted, though his office
was essentially the same. Mr. Lower, remarking upon this word, has
a quotation from the ballad of ‘William of Cloudesley,’ where the
king, rewarding the brave archer, says:—
I give thee eightene pence a day,
And my bowe thou shalt bere,
And over all the north countrè
I make thee chyfe rydere.
With him we must associate our ‘Rangers’ and ‘Keepers,’ who, acting
doubtless under him, assisted also in the work of patrolling the
woodland and recovering strayed beasts, and presenting trespassers
to the swainmote just referred to.
The bailiff, shortened as a surname into ‘Bailey,’ ‘Baillie’ (‘German
le Bailif,’ J., ‘Henry le Baillie,’ M.), like the reve, seems to have been
both of legal and private capacity; in either case acting as deputy.
[228]
This word ‘reve’ did a large amount of duty formerly, but seems
now to be fast getting into its dotage. In composition, however, it is
far from being obsolete. The ‘Reeve’ (‘John le Reve,’ M., ‘Sager le
Reve,’ H.), who figured so conspicuously among the Canterbury
Pilgrims, would be the best representative of the term in his day, I
imagine—
His lordes shepe, his nete, and his deirie,
His swine, his hors, his store, and his pultrie,
Were wholly in this reves governing.
Our ‘Grieves’ (‘Thomas le Greyve,’ A.), who are but the fuller ‘Gerefa,’
fulfilled, and I believe in some parts of Scotland still fulfil, the
capacity here described, being but manorial bailiffs, in fact. ‘The
Boke of Curtasye’ says—
Grayvis, and baylys, and parker
Shall come to accountes every yere
Byfore the auditours of the lorde.
Thus, too, our ‘Portreeves’ (‘William le Portreve,’ A., ‘Augustin le
Portreve,’ A.), who in our coast towns fulfilled the capacity of our
more general mayor, are oftentimes in our earlier records enrolled as
Portgreve.’ ‘Hythereve’ (‘John le Huthereve,’ O.), from hithe, a haven,
would seem to denote the same office, while our obsolete ‘Fenreves’
(‘Adam le Fenreve,’ A.), like the ‘Moorward’ mentioned above, had
charge, I doubt not, of the wilder and more sparsely populated
tracts of land. Many other compounds of this word we have already
recorded; some we shall refer to by-and-by, and with them and
these the reeve, after all, is not likely to be soon forgotten.
But the poorer villeins were not without those who should guard
their interests also. In a day of fewer landmarks and scantier
barriers trespasses would be inevitable. An interesting relic of
primitive precaution against the straying of animals is found in the
officership of the ‘Hayward’ (or ‘Adam le Heyward,’ as the Hundred
Rolls have it), whose duty it was to guard the cattle that grazed on
the village common. He was so styled from the Saxon ‘hay’ or
‘hedge,’ already spoken of in our previous chapter. An old poem has
it—
In tyme of hervest mery it is ynough;
Peres and apples hongeth on bough,
The hayward bloweth mery his horne;
In every felde ripe is corne.
It will be seen from these two references that the officership was of
a somewhat general character. The cattle might be his chief care,
but the common village interests were also under his supervision.
The term has left many surnames to maintain its now decayed and
primitive character; ‘Hayward’ and ‘Haward’ are, however, the most
familiar. ‘Hayman,’ doubtless, is of similar origin. If, in spite of the
hayward’s care, it came to pass that any trespass occurred, the
village ‘pounder’ was ready at hand to impound the animal till its
owner claimed it, and paid the customary fine—
In Wakefield there lives a jolly pinder,
In Wakefield, all on a green.
So we are told in ‘Robin Hood.’ I need not add that our many
‘Pounders,’ ‘Pinders,’ and still more classic ‘Pindars,’ are but the
descendants of him or one of his confrères. I do not doubt myself,
too, that our ‘Penders’ (‘William le Pendere’ in the Parliamentary
Writs) will be found to be of a similar origin.
While, however, these especial officers superintended the general
interests of lord and tenant, there were those also whose peculiar
function it was to guard the particular quarry his master loved to
chase; to see them unmolested and undisturbed during such time as
the hunt itself was in abeyance, and then, when the chase came on,
to overlook and conduct its course. These, too, are not without
descendants. Such names as ‘Stagman’ and ‘Buckmaster,’[229]
‘Hindman’ and ‘Hartman,’ ‘Deerman’ and its more amatory
‘Dearman,’ by their comparative frequency, remind us how important
would be their office in the eye of their lord.
Nor are those who assisted in the lordly hunt itself left
unrepresented in our nomenclature. The old ‘Elyas le Hunderd,’ or
‘hund-herd,’ has left in our ‘Hunnards’ an abiding memorial of the
‘houndsman.’ Similarly the ‘vaultrier’ was he who unleashed them. It
has been a matter of doubt whether or no the more modern
‘feuterer’ owes his origin to this term, but the gradations found in
such registrations as ‘John le Veutrer,’ ‘Geoffrey le Veuterer,’ and
‘Walter le Feuterer,’ to be met with in the rolls of this period, set all
question, I should imagine, at rest. An old poem, describing the
various duties of these officers and their charges, says—
A halpeny the hunte takes on the day
For every hounde the sothe to say;
The vewtrer, two cast of brede he tase,
Two lesshe of greyhounds if that he has.
testbankdeal.com