CprS 157 Schedule
CprS 157 Class 15
CprS 157 Class 17

One-dimensional Arrays
Chapter 12 - Class 16

Reading Some Sample Programs

CheckLists program

// There are two lists of integers in a data file, separated by a
// negative integer. This program compares the two lists. If they
// are identical, a message is printed. If not, nonmatching pairs
// are printed. Assumption: The lists are of equal length

The CheckLists program illustrates several important applications of arrays to common programming tasks.

Programming Exercises

  Solve this exercise in class, to your own satisfaction. If called for, create the appropriate data files and test your program on your data. Demonstrate your solutions to the instructor or to the class TA. There is nothing to hand in from this activity.

Homework For Chapter 12

  Statistical analysis has permeated modern society -- even our classroom! Today's project asks you to write a program that accepts numerical data as input and produces as output certain statistics derived from that data, and even a primitive sort of graphical display summarizing the data. Carefully follow the specifications in the text and use all of the software development guidelines you know to make a disciplined, careful development of your program design. Writing a correct solution to programming project 11.3 should put you in a strong position to reuse some of your software in solving problem 11.5. The reuse of software components is a major issue in today's programming landscape. Strive for clear, elegant, and correct code. Include enough comments for a knowledgeable reader to have no difficulties in following your lines of thought. Enjoy!