home *** CD-ROM | disk | FTP | other *** search
- // ex09017.cpp
- // A Company's Budget Program
- #include <iostream.h>
- #include "org.h"
-
- void budget(OrgEntity& oe);
-
- main()
- {
- Company company("Bilbo Software, Inc.", 35);
- Division div("Vertical Applications", 12);
- Department dept("Medical Practice", 4);
- budget(company);
- budget(div);
- budget(dept);
- }
-
- void budget(OrgEntity& oe)
- {
- cout << "\n---- Budget Report ----\n";
- cout << oe.org_name();
- cout << " $" << oe.number_employees() * oe.office_party();
- cout << '\n';
- }