CS12 Lab 2

Week of October 8—12

 

This lab deals with compiling and running programs that span multiple files and contain a user-defined class. 

After completing the lab, you should be comfortable with writing, compiling and running such a program in VisualC++.

In this lab you will also review electronic turning of assignments.

 

 

To Do

 

·        If you did not have lab last week, complete lab1 first.

·        Use the time class in your book.  Copy the files time1.h and time1.cpp on pp 405-406 in the book. (or just download them by clicking on the links).

·        Open a project and include both files in it.

·        Write a short main program in a separate file called main.cpp.  The program should declare a time object, set the time to some value, and print it in the two formats (standard and military).

·        Compile the program and run it.

·        Turn in the program electronically.

 

Note:  The turned in program will not be graded.  In order to receive credit, you must be checked off by the TA before leaving the lab.