
15.7 Exercises,Problems,and Projects 1149
EXERCISES,PROBLEMS, AND PROJECTS
20. Write a program that includes a method converting a two-dimen-
sional array of ints to a two-dimensional array of boolean values; if
the integer value is greater than or equal to 0, then the corresponding
boolean value is true, otherwise it is false. Add the necessary code to
count how many statements are executed in the innermost loop. Run
several simulations depending on the number of rows and columns in
the argument integer array. What is the running time of that method
as a function of the number of rows and columns of the parameter
array? (You should assume that each ro ...