Lab 12A: Pi Estimates

  < Previous  Next >

Objectives:

In this lab, we will practice:

Assignment:

Write the code for the header (fraction.h) and implementation (fraction.cpp) files so that piEstimates.cpp compiles and produces the following output:
22/7 = 3.14286
355/113 (3.14159)

Submission

Submit your source code using the handin program. For handin, for this lab, type the following in a terminal window exactly as it appears:
handin  lab12A  fraction.cpp fraction.h
To verify your submission, type the following in a terminal window:
handin  lab12A

Rubric:

Points  Item
------  --------------------------------------------------------------
10      Documentation
        Header comment block at the beginning of each file with:
        + Your full name
        + Date(s) code was written
        + Description
        Comments explaining the role of each variable and major section of code

40      Correctness
        Program solves the assigned problem using methods described in program description
	+ Declares a Fraction class
	+ Has a default constructor and a parameterized constructor
        + Has getter and setter member functions
        Program compiles without errors
        Program executes without crashing
        Program produces the correct output
------  --------------------------------------------------------------
50      Total