Information Technology Reference
In-Depth Information
b. Relate the steps involved in specification, algorithm devel
opment, coding (if done as part of your solution), and
testing.
c. To what extent were you involved in each step?
3. Consider the activities surrounding the solving of problems in
a class setting, in which students complete assignments given
by an instructor.
a. In a class, how are specifications for problems determined?
b. How does the statement, “Students attempt to solve the
problems given, perhaps using techniques presented by the
instructor or in the text,” relate to the steps involving spec
ifications, design, coding, testing, and maintenance?
c. Describe the roles of the students, the instructor, and the
book in determining algorithms.
d. Where or how might maintenance be considered within a
typical class?
4. Computer users often ask, “Why can't programmers get soft
ware right the first time?” Various parts of this chapter pro
vide elements of an answer. Synthesize the points given here
to formulate a careful answer to this question.
5. In mathematics, a positive integer larger than 1 is said to be
prime if it is evenly divisible only by 1 and itself. Thus, 7 is
prime, because its only factors are 1 and 7. On the other
hand, 6 is not prime, because 2 and 3 also are factors.
Now consider an algorithm that declares a number is prime if
it is 2 or if it is odd and larger than 1. Otherwise, the number
is declared to be not a prime.
a. Identify five cases where the algorithm is correct.
b. Can you identify an infinite number of cases where this al
gorithm gives the correct answer?
c. Identify five cases where the algorithm produces the wrong
conclusion.
d. Can you identify an infinite number of cases for which this
algorithm gives an incorrect result?
Search WWH ::




Custom Search