| CS 202 Fall 2013 > In-Class Challenge for Thursday, October 10, 2013 |
CS 202 Fall 2013
In-Class Challenge for Thursday, October 10, 2013
Note: There is no code to download for today’s challenge.
What to Do
Do as many of the following as you can before class ends. Along the way, maintain a program that demonstrates whatever functionality you have written. To allow for faster writing, you may put all your code into a single file, if you wish.
- Write a class
Namecontaining twostringmembers (intended to hold someone’s first & last names). The class should have a constructor that sets the member variables. Also write anoperator<<that prints the name in a reasonable form. - Write a class
Contact, derived fromName. This keeps track of someone’s name and phone number. Like className, it should allow for construction and printing. This class should reuse as much functionality of the base class as possible.
Some Reminders
- Get things to compile first, right?
- Don’t Repeat Yourself!
CS 202 Fall 2013: In-Class Challenge for Thursday, October 10, 2013 /
Updated: 10 Oct 2013 /
Glenn G. Chappell