122 Lab Outline Week 4
Project questions are discussed on cis122.blogspot.com
 

What You Will Do In Your Lab

Before your week 4 lab, the following example will be covered in class: engToMetric.cpp

The following two programs show the concept of adding a user-defined funtion to a program. This is what you will do in this lab exercise.

c-f.cpp converts temperature, and does it without a user-defined function.
c-f-v2.cpp solves the same problem, this time with user-defined functions.

The structure of a program that contains a user-defined function shows:

  1. the function is DECLARED prior to main()
  2. the function is CALLED by main()
  3. the function is DEFINED after main()

Now, for the lab exercise, you will add a user-defined function to a working program, engToMetric.cpp: Follow the directions given by your lab instructor to edit, compile and execute a C++ program named engToMetric-v2.cpp using Emacs.

The file eToM-fn-lab.cpp is a nearly-completed version of what is required.

This ends the In-lab part.