Lab 13 – Classes & Write to Files
Lab Assignment – 20 points
must be accomplished solely by you:
DO NOT look at anyone’s code other than your own, including code from another’s
student in your section or another section of the course, or any third party source, e.g.
DO NOT share or copy anyone else’s code for any graded assignment
DO NOT work in pairs or groups
All cases of academic misconduct will be reported to the
Committee On Academic
Setting up the Programming Environment
Effective commenting and tabbing will affect your grade. The “style” of your program should
follow the style of the sample programs in the lecture notes. Also see the example code from Lab
#1. Your program should have the file name, your name, creation and last modification dates and
a brief description of the program in the comments.
In addition, read the document on
“Commenting” found in the Content tab on Carmen under “Tutorials”
At the Linux command line type
. This will create a new directory named
. Work out of this directory. In order to do that, type
. This changes the
current working directory to the directory
If you have created the directory
, then just type
Copy the file
cp /class/cse1222/24926/lab13/temps_template.cpp temps.cpp
Copy the file
into the current directory.
cp /class/cse1222/24926/lab13/temps_solution.exe .
Be sure to include
(this is your course section indicator) and the period, “.”.
Write a program that will collect from the user a list of temperature samples taken throughout a
single day. Each temperature sample consists of a temperature (degrees Fahrenheit) and a time
(military time in hours and minutes only). The hours in military time is an integer between 0 and