So far, students have been *using classes* such as `string`

and *class templates* such as `vector`

. In this lab, they
see how classes are created and will "extend" C++'s data types by creating
a `Fraction`

class.

Here are:

- Prelab Questions designed to check if students have read through the lab exercise in preparation for doing the lab exercise. However, as noted before, they could also be used as "postlab" exercises.
- The lab home page This lab exercise leads
students through building a class named
`Fraction`

for doing arithmetic with fractions. The lab exercise uses points in the plane as an example and the students imitate what is done with them for fractions. By the end of the exercise, they will created a class for fractions with one arithmetic operation — multiplication — and will have overloaded the operator`*`

for it.The first project (#12.1) asks them to extend the class by overloading +, − /, ==, !=, <, >, <=, and >= and then construct a menu-driven fraction calculator. I assign this as their homework, occasionally allowing teams of two to work on it.

- Other programming projects
from or in addition to those in the textbook that tie in with the material in
this lab exercise.

Also, A gradesheet that might be used with one of these projects.

Report errors to Larry Nyhoff (nyhl@cs.calvin.edu)