
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

Lecture # 18
Declares, init object Doesn’t know internal structure of object
Manipulates object through public member functions
Lexicon lex;
lex.addWord("dog"); lex.addWord("cat"); lex.containsWord("pig");
Knows internal structure Has access to private data Manipulates object in implementing member functions
words[nWords++] = str;
nWords words
2 the and
lex.nWords++; lex.words[0] = "pig";