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.

  1. Write a class Name containing two string members (intended to hold someone’s first & last names). The class should have a constructor that sets the member variables. Also write an operator<< that prints the name in a reasonable form.
  2. Write a class Contact, derived from Name. This keeps track of someone’s name and phone number. Like class Name, it should allow for construction and printing. This class should reuse as much functionality of the base class as possible.

Some Reminders


CS 202 Fall 2013: In-Class Challenge for Thursday, October 10, 2013 / Updated: 10 Oct 2013 / Glenn G. Chappell