lec0124-ctorsptrs - Todays announcements Course policies...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Today’s announcements: Course policies: http://cs.illinois.edu/class/cs225 Email assistance (ews, svn, etc.): [email protected] Sections meet in Siebel 0224, NOT ARR. HW0 available, due today before lecture. MP1 available, due 1/25, 11:59p. DYB (Siebel 2407): – Every Mon, 3-5p (Cinda) – Every Fri, 6-8p (Jack) Proficiency exam: 1/31, 7-10p, Siebel 2407
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Structure of a class defn (cont): class sphere{ public: sphere(); sphere(double r); void setRadius(double newRad); double getDiameter() const; private: double theRadius; }; … //constructor(s) (next page) void sphere::setRadius(double newRad){ theRadius = newRad; } double sphere::getDiameter() const { return 2*theRadius; } Asides: const : a pinky promise by getDiameter that it will not change a private member of the sphere class. :: : “scope resolution operator” connects this implementation of setRadius to sphere class
Background image of page 2
Constructors (intro): //default constructor sphere::sphere(){ } //default constructor, alternative
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/26/2012 for the course CS CS 225 taught by Professor Heeren during the Spring '09 term at University of Illinois, Urbana Champaign.

Page1 / 12

lec0124-ctorsptrs - Todays announcements Course policies...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online