Announcements

The spring registration dates are now available to students in WebAdvisor.
Students should log in and view their individually assigned date.

The Office of Equity will be sponsoring a Vigil on Thursday, November 1,
from 10 - 11 am in the Quad in response to the recent tragedy in Pittsburgh.
We would like to invite staff, faculty and students to attend the
Vigil as we take time to remember those lives that were lost and to
also come together to focus on strength and hope for humanity amidst these
senseless acts of violence.

In this exercise we trace the flow of control when objects are constructed and member functions are called.

Specifications

Create a text file named trace.txt.

In the trace.txt file, list the line numbers of each statement of your program from the example below in the order the lines are executed. For example, if main() starts on line 54, statements are executed as follows:

55-56, 19-21, 57, 24-26, ...

Do not bother to list blank lines or lines containing only a curly brace (}) of a function definition.

Review the hand trace with another student in the class. Then add a comment to the top of the file that contains the name of the person with whom you reviewed the code, like:

Compile and run your modified program to make sure you made the changes correctly. When you run the program, the output should look like:

Enter a list of names.
When finished enter the word: done
Fox Foxison
George Georgeson
done
The first name on the list is: Abel Ableson
The last name on the list is: George Georgeson
Your list:
Abel Ableson
Baker Bakerson
Charlie Charleston
Dogg Dogson
Easy Easyson
Fox Foxison
George Georgeson

If there are any problems, compare your source code to the listing below.

Save your program source code to submit to Canvas as part of assignment 11.

Completed Program

Once you are finished, check your source code by clicking here.

Reviewing another solution after you have completed your own is often helpful in learning how to improve your programming skills.

Check Yourself

As time permits, be prepared to answer these questions. You can find more information by following the links after the question.