CS-182 Lab 2: C++ Environment
Dr. Mark J. Sebern
Overview
The purpose of this lab is to become familiar with building
console-mode applications in the C++ environment.
Activities
In this lab, you will:
- Download a program source file
- Compile, build, and test the program
- Modify the program
- Compile, build, and test the modified program
- Report on your results
Detailed instructions
If you have difficulties with any part of the lab, consult the
instructor for assistance. The basic sequence is:
- Download the change maker program (file cmaker1a.cpp) from the Web. To do
this in most browsers, right click on the file link, and
select "save as". The browser will ask you for
a location to store the file; on the warp
network, you would normally create a directory on the F:
drive. Ask the instructor for assistance, if needed.
- Build a project, following the instructions for your
compiler.
- Test the program by running it and supplying different
input values.
- Modify the change maker program to handle two-dollar
($2) bills and half-dollar ($0.50) coins,
as well as the currency and coins that are already in the
program. Add header comments with your name and a brief
description of your modifications.
- Compile, build, and test the modified program.
- Submit the lab report (details below).
Lab report
The lab report should consist of the following:
- A copy of the source code for your modified change maker
program.
- A brief description of any problems you encountered or
questions you have regarding the lab.
You may submit this report in hard-copy form, or email it to
the instructor. If you choose email, it may be convenient to put
the textual portion of the report directly in the message, and to
attach the modified source file. Ask the instructor for the
details on this procedure if you wish to try it. Be sure to keep
copies of all your files, in case something gets lost; it may be
wise to keep a diskette backup as well.
The lab report is due by the beginning of the following lab
period, though you are encouraged to submit it sooner if you can.
If you have any questions, consult the instructor.
This page was last updated on August 27, 1997; send comments to Mark Sebern.