Next | February 2001 | Slide #52 |
Write a program that reads the HTML files named in its command-line arguments. For each file, it should print out the text contained in the file's <H1>, <H2>, <H3>, <H4>, <H5>, and <H6> elements. Then test it.
Modify the Employee::boss accessor so that it automatically updates the boss's team data for any employee who has a boss.
If you have time, add a new method, perform_task, to your Employee class. If the target object is a regular Employee, then perform_task should take a string argument and print out
<Employee name>: I am staying late today to work on <...>.
But if the employee is a manager whose TEAM data is nonempty, it should instead select a team member at random, print
<Manager's name>: <Subordinate's name> will take care of this while I play golf.
Then it should delegate the perform_task call to the employee it has chosen.
Next | ![]() |
Copyright © 2001 M-J. Dominus |