Select a partner to work with on the closed lab exercise and decide whose
account to use for it. After you have completed the closed lab exercise,
the person whose account has been used may e-mail to his/her partner the
file(s) containing the solution that was devised by the partnership.
Copy the initial closed lab #8 files to your own working directory and get
into that directory:
Make sure you understand the Resolve/C++ code in Names_1.cpp; then do the same for
Names_2.cpp. These should be similar to
what you wrote for the homework; if they're not, make sure you
understand any differences. Run the programs Names_1 and Names_2
(which were compiled from Names_1.cpp and Names_2.cpp, respectively),
redirecting input from the file names.txt. The latter (also in
file names-out.txt) is what the customer (hence the boss) wants to see
as the result of a simple maintenance request starting with
Names_1.cpp.
What if you were doing this in regular C++ style? Names_1_C++.cpp
contains the starting point, the direct counterpart of Names_1.cpp.
The files
Names_2.1_C++.cpp-bug,
Names_2.2_C++.cpp,
and Names_2.3_C++.cpp
contain the first three iterations of a (semi-experienced?) C++ programmer
toward a regular C++ program that attempts to do the same thing as Names_2.cpp.
Your job is to fix Names_2.4_C++.cpp -- which initially contains the same
code as Names_2.3_C++.cpp -- so that it produces the correct output, i.e.,
the same thing as Names_2 produces. (This is exactly what you were
supposed to do for the homework in preparation for closed lab. This
time, work with your partner, comparing results and sharing the thinking that
went into them.) You should not change Stack.h, although
you'll have to read and understand this as required in the homework. You
may compile and link a normal C++ program just like a Resolve/C++ program
using rcpp-make, or you may use a command like this (where the name you want
to give the executable program file is specified with the "-o" switch):
c++ -o Names_1_C++ Names_1_C++.cpp
Let your instructor know when you have completed this task, in order to
get credit for this closed lab.