Advanced Programming I Code Review for Programming Assignment 2

Advanced Programming I Lecture Notes

28 February 2006 • Assignment 2 Code Review


Outline

The Problem

The Big Idea

Are We Done?

A Refinement

Another Refinement

Another Solution

Choosing Words

Important Decisions

Early Mistakes

Does It Help?

Sorting

Test Cases

Test Results

Coding Observations

Follow Directions

Don't Repeat Yourself

Test Your Code

Know Your Tools

Avoid Globals

void find_characters() for (i = 0; i < largest; i++) if (i==0) for (j = 0; j < countarray[i]; j++) string str = lengtharray[i][j] carray[indx1][indx2[indx1]++] = str[0] indx1++ else for (j = 0; j < countarray[i]; j++) string str1 = lengtharray[i][j] carray[indx1][indx2[indx1]++] = str1[str1.size()-1] indx1++

References


This page last modified on 1 March 2006.

This work is covered by a
Creative Commons License.