This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: CSE 335 Homework 2 Objective: Gain experience using inheritance and function over-riding. Description: Copy the files cse335/AlexLiu/HW/HW02/hw02. * into your account. These files define a simple main() program that manipulates instances of a class Person , such as might be used to store information about bank employees and customers. You must define two new classes Employee and Customer . More precisely: 1. Create a Makefile to simplify the compilation and rebuilding of this program throughout this exercise. As you develop new classes, be sure to nicely separate class declarations, which should appear in .h files, from method implementations, which should appear in .cc files, and be sure to update your Makefile as appropriate. 1 2. Create a class Employee that inherits from Person . This new class should declare a data member of type string that stores a job description. Over-ride the printAll() operation with a new method that invokes Person::printAll() and then prints the employee-...
View Full Document
This note was uploaded on 12/14/2009 for the course CSE 335 taught by Professor Kraemer during the Fall '08 term at Michigan State University.
- Fall '08