CIS 22B - Notes for Mon Nov 20

Announcements and Reminders

Review exercise 15

More Class Concepts

CIS27 Notes

Examples (zip file)

The this pointer

Static Data Members

Static Member Functions


Lab Exercise #9

Put your name, the compiler used, and Lab Exercise #9 in a comment at the top of your program. Email your source code. This lab exercise is due at the beginning of the next lecture.  You may email your lab solution prior to that.  

Complete the following program:

class Circle
    static float pi;
    float radius;
    Circle(float = 1.0);
    static void changePi(float);
    friend float circumference(const Circle&);


int main()
    Circle c(5.0);
    cout << circumference(c) << endl;
    cout << circumference(c) << endl;

******  Program Output  ******