Tuesday, 21 May 2013

week 11 day 1

In the class cat declaration, for example you create a contract that every cats age can be initialized in its constructor assigned to it by its SetAge() accessor function and read by its GetAge() accessor. You also promise that every cat will know how to Meow(). Note that you say nothing in the public interface about the member variable ItsAge, that is an implementation detail that is not part of your contract.

No comments:

Post a Comment