Code Examples
from

Chapter 3
The Notion of a Class and Some Other Key Ideas

of
Programming with Objects




NOTE: Browsers generally have difficulty displaying source code files in
their raw form.  A browser may also gratuitously enclose a raw source
code file within html tags for the purpose of display.  So it is best to
right-click on the items listed below and to then click on the "save
link as" or the "save target as" menu item for directly transferring the
file to your local disk.



User1.cc


User2.cc



User3.cc



User.java



Polymorph.cc



Polymorph.java



BlockInheritance.java



BlockInheritance2.java



BlockInheritance.cc



PrintObj.java



PrintObj.cc



Dest.cc



SortTiming.java



TestOne.java_packageX



TestTwo.java



TestOne.java_packageY



TestFinal.java



Namespaces.cc



Namespaces2.cc



Namespaces3.cc



Namespaces4.cc



NamespaceNested.cc



Koenig.cc



Friend.cc



EqualityTest.java



TemplateX.cc



NestedClass.cc



NestedClassDefsNotInline.cc



EnclosingClassAccess.cc



NestedTypes.cc



NestedClass.java



NestedClassAsType.java



EnclosingClassAccess.java



InnerClass.java



InnerClassThisPrefix.java



NestedInterface.java



SimulatedOO.c




Back to the home page for Programming with Objects