home *** CD-ROM | disk | FTP | other *** search
- // Chapter 6 - Program 13 - USEPHRAS.CPP
-
- #include "iostream.h"
- #include "phrase.h"
-
- void main()
- {
- phrase my_text;
-
- cout << "The phrase is ---> " << my_text.get_phrase() << "\n";
- my_text.set_noun("baseball");
- cout << "The phrase is ---> " << my_text.get_phrase() << "\n";
- my_text.set_verb("Throw");
- cout << "The phrase is ---> " << my_text.get_phrase() << "\n";
- my_text.set_noun("game");
- cout << "The phrase is ---> " << my_text.get_phrase() << "\n";
- }
-
-
-
- // Result of execution
- //
- // The phrase is ---> the
- // The phrase is ---> the baseball
- // The phrase is ---> Throw the baseball
- // The phrase is ---> Throw the game
-