12.05.2015 Views

type - David Vernon

type - David Vernon

type - David Vernon

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Classes and Objects<br />

Classes and Structures<br />

• Differences between Classes and C structures<br />

– Encapsulation<br />

» classes (and C++ structures) can have functions as their<br />

members<br />

» these functions operate on the data members<br />

– Data hiding<br />

» classes provide form member-access control<br />

» for each component in a class or structure we can indicate<br />

whether or not data hiding is to apply<br />

» defaults:<br />

• class: full data-hiding<br />

• structure: no data-hiding<br />

Copyright © 2007 <strong>David</strong> <strong>Vernon</strong> (www.vernon.eu)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!