helloWorld.cpp This is the standard first program that just prints out "Hello World". example1.cpp This simple program prompts the user for 10 numbers, then displays the average, total, number that are even, and the number that are odd. mystring.cpp This program shows some simple string manipulation in C using character arrays. example2.cpp This program shows how to read in one character at a time. example3.cpp This program demonstrates how to declare subroutines and pass parameters to them. structexample1.cpp This program declares and manipulates an array of structs. structexample2.cpp This is a more complex example using structs. structptrs.cpp This is similar to the first example, except space is allocated at run time. ptrs2.cpp This program prints out various pointer values. ---------------------------------------------------------------------- --------------- OBJECTS, CLASSES, AND DESIGN ------------------------- ---------------------------------------------------------------------- BEFORE WE BEGIN: Suppose you have been asked to write a program to maintain a linked list of numbers. Your list will always be created with the first value known. You need to be able to return the value of any node, add a new value after the first one, and print the list. class1.cpp This is our first attempt at a linked list class. Here, all methods are "stubbed out", but the testing calls are present. class1Commented.cpp This is the same as class1.cpp except with comments added to demonstrate how commenting should be done. You should probably note the formatting of the code as well. class2.cpp This adds the constructor and the get method to class1. These are able to be tested before moving on. class3.cpp This adds the print method, which can be partially tested before moving on. class4.cpp Finally, addbehind is added, and can be tested in conjunction with the print method. class4b.cpp This is the same as class4.cpp except First is declared statically in main. Note the different syntax in referencing the methods. class4header.h class4imp.cpp class4run.cpp These 3 files break the functionality of class4.cpp into three parts: class4header.h contains just the header defintion; class4imp.cpp contains the implementation of the methods, and class4run.cpp contains main. These may be compiled separately and made available to the user in a special way. ---------------------------------------------------------------------- BEFORE WE CONTINUE: Now suppose we are told that the linked list is not always created with the first value known, and that we need to be able to add a new value BEFORE the first one. This requires a redesign ---------------------------------------------------------------------- class5.cpp This program shows the linked list class implemented with two classes (linkedListClass and realList) with most of the work being done in the linkedListClass. The methods in the realList class are sometimes called "driver methods" because they mainly only call methods from the linkedListClass. class6.cpp This program shows the linked list implemented with the same two classes, linkedListClass and realList. This time, realList is made a "friend" of linkedListClass and may therefore reference the private data members of that class. Thus, in this program, most of the work is done in realList. classdestruct.cpp This program demonstrates how to clean up space with a destructor. realList is implemented with a destructor method that deletes all linkedListClass nodes. ---------------------------------------------------------------------- USE WHEN NEEDED: iofix.cpp This program demonstrates how to catch and fix IO errors. stack.cpp This program demonstrates how to use the linked list class to implement a stack. fibo1.cpp fibo2.cpp These two programs are a recursive implementation and an iterative implementation of the algorithm to generate the nth Fibonacci number. ----------------------------------------------------------------------