<<< UML Class Diagram Video Notes     Index     Object design principles >>>

5. Sizes of objects


  • Size of an object is determined by

    • number of data items (aka data variables)

    • calculated as the total number of bytes in each data item.

  • Note: number of Java methods or C++ functions does not measure the object size.

    • Although each method can be measured in the number of bytes of the actual code, there is not necessarily a physical copy of one method for each object. Rather, each object points to the same physical code.

    sizes of objects
<<< UML Class Diagram Video Notes     Index     Object design principles >>>