Tuesday, August 17, 2010

C++: Misc notes 5

Hi,
I'm sure learning about classes is a new thing for most of you, so I decided
to have you create a table class - since I think it's one of the simplest
object that i can think of. i shouldn't have put in double variables for
width and length, but I put that in their because we need those for later
when we get into inheritence.

Few more misc notes:
* When designing a class, write out what the properties of a class should
have, as well as means of manipulating and getting info from it.
* Be sure to include scope resolution operator, otherwise the ocmpiler will
complain about undefined variables and functions.
* When writing interface files, include semicolon at the end of the function
signature; in the implementation, you don't include a semicolon when writing
the body of the function in question.

That's all I can think of at the moment...
// JL

No comments:

Post a Comment