Starting Out With C++ Early Objects 7th Edition Gaddis Solutions Manual - Fast Download To Start Reading Immediately
Starting Out With C++ Early Objects 7th Edition Gaddis Solutions Manual - Fast Download To Start Reading Immediately
_____ Follow the link below to get your download now _____
https://testbankdeal.com/product/starting-out-with-c-early-
objects-7th-edition-gaddis-solutions-manual/
https://testbankdeal.com/product/starting-out-with-c-early-
objects-8th-edition-gaddis-solutions-manual/
https://testbankdeal.com/product/starting-out-with-c-early-
objects-9th-edition-gaddis-test-bank/
https://testbankdeal.com/product/starting-out-with-java-early-
objects-6th-edition-gaddis-solutions-manual/
https://testbankdeal.com/product/elementary-statistics-a-brief-6th-
edition-bluman-test-bank/
Theory and Practice of Counseling and Psychotherapy 10th
Edition Corey Test Bank
https://testbankdeal.com/product/theory-and-practice-of-counseling-
and-psychotherapy-10th-edition-corey-test-bank/
https://testbankdeal.com/product/introduction-to-creativity-and-
innovation-for-engineers-1st-edition-walesh-solutions-manual/
https://testbankdeal.com/product/i-never-knew-i-had-a-choice-
explorations-in-personal-growth-10th-edition-corey-test-bank/
https://testbankdeal.com/product/microeconomics-canadian-15th-edition-
ragan-solutions-manual/
https://testbankdeal.com/product/organic-chemistry-10th-edition-
solomons-test-bank/
Financial Management Theory and Practice 15th Edition
Brigham Solutions Manual
https://testbankdeal.com/product/financial-management-theory-and-
practice-15th-edition-brigham-solutions-manual/
Starting Out with C++: Early Objects, 7e (Gaddis, et al.)
Chapter 9 Searching, Sorting, & Algorithm Analysis
Chapter 9, Test 1
3) The linear search is adequate for searching through ________ arrays, but not through
________ ones.
A) int, double
B) char, string
C) ascending, descending
D) small, large
E) any regular, vector
Answer: D
4) True/False: Using a linear search, you are more likely to find an item than if you use a binary
search.
Answer: FALSE
1
Copyright © 2011 Pearson Education, Inc.
6) If the item being searched for is not in the array, binary search stops looking for it and reports
that it is not there when ________.
A) array index first > array index last
B) Boolean variable found = false
C) Boolean variable found = true
D) it finds a value larger than the search key
E) it has examined all the elements in the array
Answer: A
7) True/False: When searching for an item in an unordered set of data, binary search can find
the item more quickly than linear search.
Answer: FALSE
10) The ________ sort usually performs fewer exchanges than the ________ sort.
A) bubble, selection
B) selection, bubble
C) binary, linear
D) linear, binary
E) linear, bubble
Answer: B
11) To find a value that is in an unordered array of 100 items, linear search must examine an
average of ________ values.
A) 7
B) 10
C) 50
D) 100
E) 101
Answer: C
2
Copyright © 2011 Pearson Education, Inc.
12) To determine that a item is not in an unordered array of 100 items, linear search must
examine an average of ________ values.
A) 7
B) 10
C) 50
D) 100
E) 101
Answer: D
13) To locate a value in an ordered array of 100 items, binary search must examine at most
________ values.
A) 7
B) 10
C) 50
D) 100
E) 101
Answer: A
14) A bubble sort is being used to arrange the following set of numbers in ascending order:
7 5 3 9 2 6
After the first pass of the sort is completed, what order will the data be in?
A) 2 5 3 9 7 6
B) 5 7 3 9 2 6
C) 5 3 7 2 6 9
D) 2 3 5 6 7 9
E) None of the above
Answer: C
15) A selection sort is being used to arrange the following set of numbers in ascending order:
7 5 3 9 2 6
After the first pass of the sort is completed, what order will the data be in?
A) 2 5 3 9 7 6
B) 5 7 3 9 2 6
C) 5 3 7 2 6 9
D) 2 3 5 6 7 9
E) None of the above
Answer: A
16) True/False: When sorting an array of objects or structures, one must decide which data item
to sort on.
Answer: TRUE
3
Copyright © 2011 Pearson Education, Inc.
17) When sorting an array of objects, if the values in the data member being sorted on are out of
order for two objects, it is necessary to ________.
A) examine a different data member
B) swap these two data values
C) swap the two objects
D) swap one-by-one all data members in the two objects
E) stop the sort
Answer: C
18) True/False: Bubble sort and selection sort can also be used with STL vectors.
Answer: TRUE
19) We can measure the complexity of an algorithm that solves a computational problem by
determining the number of ________ for an input of size n.
A) output statements it has
B) times it loops
C) basic steps it requires
D) variables it uses
E) operations it performs
Answer: C
20) If algorithm A requires 2n + 1 basic operations to process an input of size n, and Algorithm B
requires
3n + 2 basic operations to process the same input, algorithm A is considered to be more efficient
than Algorithm B.
Answer: FALSE
Chapter 9, Test 2
4
Copyright © 2011 Pearson Education, Inc.
3) The ________ search is adequate for searching through small arrays, but not through large
ones.
A) binary
B) linear
C) blind
D) bubble
E) random
Answer: B
4) True/False: Using a binary search, you are more likely to find an item than if you use a linear
search.
Answer: FALSE
5) If a binary search is used to search for the number 4 in the 11-element array shown below,
which value will the 4 be compared to first?
1 2 3 4 6 7 8 9 10 12 17
A) 1
B) 7
C) 8
D) 9
E) None of the above
Answer: B
6) When searching for a particular object in an array of objects, it is necessary to compare the
________ to the value in each examined object's ________ .
A) search key, private member data
B) key field, public member data
C) search key, public member data
D) search key, key field
E) key field, search key
Answer: D
7) To determine that a value is not present in an unordered array of 50 items, linear search must
examine an average of ________ values.
A) 1
B) 6
C) 25
D) 50
E) 51
Answer: D
5
Copyright © 2011 Pearson Education, Inc.
8) To locate a value that is in an ordered array of 50 items, linear search must examine at most
________ values.
A) 1
B) 6
C) 25
D) 50
E) 51
Answer: D
9) To locate a value in an ordered array of 50 items, binary search must examine at most
________ values.
A) 1
B) 6
C) 10
D) 25
E) 50
Answer: B
12) When an array is sorted from highest to lowest, it is said to be in ________ order.
A) reverse
B) forward
C) descending
D) ascending
E) downward
Answer: C
13) True/False: Any sorting algorithm, such as bubble sort or selection sort, that can be used on
data stored in an array can also be used on data stored in a vector.
Answer: TRUE
6
Copyright © 2011 Pearson Education, Inc.
14) A bubble sort is being used to arrange the following set of numbers in ascending order:
8 6 4 9 3 7
After the first pass of the sort is completed, what order will the data be in?
A) 3 4 6 7 8 9
B) 3 6 4 9 8 7
C) 6 4 8 3 7 9
D) 6 8 4 9 3 7
E) None of the above
Answer: C
15) A selection sort is being used to arrange the following set of numbers in ascending order:
8 6 4 9 3 7
After the first pass of the sort is completed, what order will the data be in?
A) 3 4 6 7 8 9
B) 3 6 4 9 8 7
C) 6 4 8 3 7 9
D) 6 8 4 9 3 7
E) None of the above
Answer: B
16) The ________ sort usually performs more exchanges than the ________ sort.
A) bubble, selection
B) selection, bubble
C) binary, linear
D) linear, binary
E) linear, bubble
Answer: A
17) Selection sort requires ________ passes to put n data items in order.
A) n
B) n/2
C) n/2 +1
D) n-1
E) n+1
Answer: D
18) True/False: When sorting an array of objects, if the values in the data member being sorted
on are out of order for two objects, those two data values should be swapped.
Answer: FALSE
7
Copyright © 2011 Pearson Education, Inc.
19) We can estimate the ________ of an algorithm by counting the number of steps
it requires to solve a problem.
A) efficiency
B) number of lines of code
C) run time
D) code quality
E) result
Answer: A
20) True/False: If algorithm A requires 2n + 1 basic operations to process an input of size n, and
Algorithm B requires 3n + 2 basic operations to process the same input, algorithms A and B are
considered to be equally efficient.
Answer: TRUE
8
Copyright © 2011 Pearson Education, Inc.
Other documents randomly have
different content
of $3,096,768, at the actual cost to the Improvement Company, to
wit, $1,524,356.
To complete the connection to the coast the Atchison built from
Waterman, some seventy miles east of Mojave on the Atlantic &
Pacific, to Colton on the Southern Pacific, and secured control of the
408
California Southern from Colton to San Diego. In 1885 entrance
was obtained to Los Angeles by lease of the Southern Pacific track
409
between Colton and that city.
The money for this rapid progress was obtained by the sale of
both stocks and bonds, but on the whole stock predominated. The
directors rightly considered it much more conservative to issue stock
and sell it at par than to load the road down with a heavy debt in
the shape of bonds; and what is more, they were able to make good
their word, and to sell stock at or near par in spite of the risk
incident to operations such as the Atchison was conducting and the
frequent bonuses or stock dividends declared.
By 1884, then, Atchison had reached the Pacific coast. The next
great steps were the extensions to Galveston and to Chicago. The
year of entrance to Los Angeles the Atchison did not cross the
southern boundary of Kansas. Certain of its stockholders were,
however, unofficially interested in the Gulf, Colorado & Santa Fe,
which ran from Galveston on the south to the Indian Territory on the
north, roughly 200 miles. In 1884 a charter was obtained for the
Southern Kansas Railway Company, a corporation organized solely to
build south from Arkansas City. The same year the Gulf, Colorado &
Santa Fe obtained permission to stretch north. The two roads met at
410
Purcell in the summer of 1887. In 1886 the Gulf, Colorado & Santa
Fe was formally brought in. Gulf stock then amounted to $4,560,000
and bonds had been issued to a limit of $17,000 per mile. For the
entire capital stock, subject to the above encumbrance, Atchison
411
agreed to pay $8000 a mile in Atchison stock, par value. The final
move was to get into Chicago. “The Atchison Company has been
much too conservative during the last few years,” said the Chronicle,
“and thus has allowed its territory to be invaded.” The first intent
was to build direct. There were incorporated, in Illinois the Chicago,
Santa Fe & California Railway Company, and in Iowa the Chicago,
Santa Fe & California Railway Company of Iowa. In 1887 the
Atchison was able to purchase the Chicago & St. Louis Railroad,
412
between Chicago and Streator, with a branch to Pekin, and to
save itself construction between these points. The whole line was
413
opened for traffic in May, 1888.
This completed Atchison’s systematic extensions before 1889.
From a local road in Kansas it had become a through route, taking
freight over its own rails from Chicago to Galveston and to the
Pacific coast. But especially in the latter eighties competition had
become keen; and to its strategic extensions Atchison was obliged to
add competitive building on an enormous scale. Of the 7000 miles in
1888, over 2700 had been added since January, 1886, and had been
built, not to tap new sources of traffic, but to defend what was
thought to be Atchison’s rightful territory by means of a desperate
war of rates. “About three or four years ago,” said a competent
observer, “a mania seized three great corporations (Atchison,
Missouri Pacific, and Rock Island) to gridiron Kansas with railroad
iron, and each tried hard to see which could cover the most ground,
without regard to the character of the ground, the result [being that]
railroads were built where they would not be required for ten years
414
to come.” Such roads could not be expected to pay, and in fact
did not. Even in the case of better planned extensions, the lines had
to be built in an unopened territory, the traffic of which had yet to be
developed. In Indian Territory, Oklahoma, and Arizona, the bulk of
the country had less than two inhabitants to the square mile; in New
Mexico and Lower California only one-half of the area was more
thickly settled; and it was largely from this southwestern corner that
local traffic for the Atchison had to be built up.
The method of financiering these competitive extensions varied:
sometimes the parent company guaranteed the principal and interest
of the branch-line bonds; sometimes it took these into its treasury
and issued collateral bonds against them; sometimes, perhaps more
frequently still, it leased new roads for a rental equivalent to the
annual interest on their bonds. If the branches could have earned
their fixed charges the burden on the Atchison would have been
nominal, but as in large part they could not it was real and serious.
In 1888 there were actually paid in rentals, interest on Sonora
Railway bonds, and on sundry railway bonds, $2,361,300. Large
sums were carried to capital account. In 1888 there was an
accumulated account of “due from sundry leased, controlled, and
auxiliary roads in construction and general account” (net)
$13,558,678, including various cash current construction and other
charges, which was carried as an asset, but which in reality
consisted of advances from which there was little or no hope of
return. Besides the claims for interest the parent company had in
practice other claims to meet. Where a branch failed to earn
operating expenses, as often happened, sums had to be advanced to
keep the road and rolling stock in repair. Thus the item “due from
auxiliary roads in current traffic and operation accounts” amounted
in 1888 to $1,008,554. Bills and accounts payable the same year
were $6,553,775, and accrued interest, taxes, and sinking funds
totalled $915,337. The following table shows vividly the effect upon
the system of the rapid extension of the years 1884 to 1888:
Total System
1884 1888
Mileage 2,799 7,010
Bonds 48,258,500 163,694,000
Stock (Atchison) 60,673,150 75,000,000
Gross earnings 16,699,662 28,265,339
Operating expenses 9,410,424 21,958,195
Net earnings from operation 7,289,237 6,307,145
Net profits, excluding
dividends 5,147,883 def. 2,933,197
Net profits, including
payments for dividends
and interest on floating
debt def. 5,557,323
Whatever may be said as to the necessity of extension, it is
evident that the position of the system by 1888 had changed for the
worse. This last-named year was a bad one, it is true, but certain
evils of which the directors then complained were permanent, and
should have been permanently allowed for. Some realization of the
fact that the Atchison might be going too fast appeared in the
financial journals of the time. “Were these undertakings less solidly
backed,” said the Railway Age, “there might be apprehension that
415
enterprise was being pushed too far and too fast.” But on the
whole the rapid growth and enormous extent of the system seem to
dazzle beholders. “The career of this company,” said the Railway Age
again, “has been one of the marvels of railway enterprise, and it
would be unsafe now to attempt to fix a limit to its extension or to
the ambition of its Napoleonic president and its bold and enterprising
416
directors.”
In 1887 the directors increased the rate of dividend from 6 to 7
417
per cent. The action was thoroughly unjustifiable, and the rate
was speedily again reduced. By the end of 1888 the main company
was liable to be called on any year to the extent of $8,625,365,
which was the amount of interest on auxiliary roads either
guaranteed or payable as rentals. In four years the mileage of the
Atchison system had increased 150 per cent; its bonded
indebtedness 239 per cent; its fixed charges 216 per cent; and its
gross earnings only 69 per cent; while the deficits on its branch lines
were obviously not matters of bookkeeping, and the value of
interchanged business was not equal to the increased burdens which
the subsidiary lines imposed. The floating debt mounted up, as is
usual in times of trouble. From a total of $3,317,446 in 1884 it
increased to $8,076,059 in 1888. To offset it the directors secured in
October, 1888, subscriptions to a $10,000,000 issue of “guarantee
fund,” three-year notes. Not all of the amount authorized was to be
sold at once, but from time to time Atchison was to call on
subscribers to take part of their subscription, and the notes were to
418
bear 6 per cent from the time they were put forth. For the rest,
the directors economized as much as possible. Salaries were cut 10
per cent in every branch of the service, beginning with the
president, and the unlucky 7 per cent rate of dividend was reduced
to 6 per cent, to 2 per cent, and then to nothing at all in successive
quarters. None of these expedients proved sufficient. In fact, the
situation was so critical that nothing short of a general
reorganization could probably have secured the radical reduction in
fixed charges which the company required.
In September, 1889, accordingly, Messrs. Libby, Abbott, Peabody,
and Baring were appointed a committee to consider the broad
419
question of financial and general reorganization, and in October a
plan for the complete rehabilitation of the company was brought
forward. The obligations with which the plan had to deal are
indicated in the following table:
1890 $7,632,348
1891 7,631,598
1892 10,953,896
1893 12,126,866
1891 $5,204,880
1892 7,853,173
1893 8,085,608
1894 5,956,615
1891 $1,964,285
1892 60,938
1893 134,825
1894 3,008,242
Thus the new charges appeared well within the earning power of the
road. The plan made the following, provision for cash requirements:
testbankdeal.com