Errata to CMIS 102 Course Modules

Last updated 26 October 2007

1. Module 1 Commentary, Section I-C (Evolution of Computing Hardware)

Babbage's Analytical Engine, and the Harvard Mark I, are described under the heading of Analog Computers. Both were digital computers.

2. Module 2 Programming Exercises

(a) In introductory comment to template, change
      /* 2. Pay rate (dollars per week) (float) */
to
      /* 2. Pay rate (dollars per hour) (float) */

(b) In second line following int main() {, change
     declare pay_rate as a float; //Pay rate: dollars per week
to
     declare pay_rate as a float; //Pay rate: dollars per hour

(c) After // read in the pay rate, change
     cout << "Weekly pay rate (specify two digits "
to
     cout << "Hourly pay rate (specify two digits "

3. Module 3 Programming Exercises, Code Template for Exercise 2

In the line

     cout << "Input numbers are: " << x << " , " << y << endl :

change the colon at the end to a semicolon.

Change

1. Two numbers - negative numbers not allowed

to

1. Two numbers - only positive integers allowed

Change

cout << "Enter the first number (integer) : " ;

to

cout << "Enter the first number (positive integer) : " ;

Change

cout << "Enter the second number (integer) : " ;

to

cout << "Enter the second number (positive integer) : " ;

4. Module 3 Programming Exercises, Code Template for Exercise 3

In the introductory comment, change "repeatedly multiply x by itself, y times" to "set a variable equal to 1, then multiply that variable by x, y times"

After cout << "Enter number to be raised to power (float) : ";, change
     cin >> y ;
     cout << "Enter the exponent (positive integer) : " ;
     cin >> x;
to
     cin >> x ;
     cout << "Enter the exponent (non-negative integer) : " ;
     cin >> y;

5. Module 4 Programming Exercise, Code Template for Exercise 1

(a) Change the first line of the of the function definition (following return (0) ;} ) from
       binomial(int n, int k)
to
       int binomial(int n, int k)

(b) Delete all five occurrences of <![ endif]>.