PPT Slide
How to model a box? (Java example)
public void setLength (int iNewLength) {
util.ASSERT (iNewLength > 0, “iNewLength <= 0”);
public void setWidth (int iNewWidth) {
util.ASSERT (iNewWidth > 0,
public int getLength ( ) {
Evolution of an Object (cont’d)
Instance variables (because they’re not static)
Methods to change (‘modify’) instance variables
Method to get (‘access’) instance variable