Before you tackle the homework, remind yourself of our General Advice, Advice on Homeworks, and Grading Guidelines. Above all, keep your work neat and honest.
An employee-record is a structure (make-empnode N S P M) where N is a symbol representing the person's name, S is a number representing their salary, P is a (listof symbol) naming their projects, and M is a (listof employee-records) indicating who the person manages. (define-struct empnode (name salary projects manage))
Rewrite the exam problem project-salary in accumulator style. The program should consume a symbol (a project name) and an employee-record and produce a number. The returned number should be the sum of all of the salaries of all personnel on the project.
(Note: the helper function that checks whether a project name is in a list of projects does not need to be written in accumulator style).
Write a program that provides all of these services. Your program must hide the accounts so that the only way to modify an account is through your program. Aside from that restriction, the interface for your program is your decision.
|Kathi Fisler||This page was generated on Wed Nov 10 11:30:27 CDT 1999.|