Lecture 4
Reading: Ch. 3 textbook.
- Administrative: hw 1 will be graded by 6pm today. Stop by and
pick it up from the little crate by my office, from the folder
with your name on it.
- Finish debugging program started on Thursday,
here.
- What are core files. Remove them!
- Show how to use data files for a coherent testing, both
"good" cases and "bad" (extreme) cases.
a.out < data
where dat is a file containing the test data for the
program (e.g. a list of integers ending with 0, to test Seelction
Sort). An extreme data set might be: a list of more than 10
integers; containing zeroes or non-integers. Test and see what happens.
- Insertion Sort. Go over algorithm in class. Help with
designing and debugging hw2.
- Assigned reading: ch. 3 textbook, Software
reliability. Keywords: test driver, stub, loop
invariant. Use ch. 3.3.4 for back up reading on Insertion
Sort, but careful: the program in the book is not what I want for
Hw 2 (I want explicit functions for searching and shifting,
rather than insertNextItem used in the textbook).
- If time allows, do a program to sort an array of
characters. Modify existing Selection Sort program. Class
discussion. Preparation for next topic: templates.