home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 13 / CDA13.ISO / cdactual / demobin / share / program / C / ANSICPP.ZIP / EX09017.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1990-07-24  |  505 b   |  25 lines

  1. // ex09017.cpp
  2. // A Company's Budget Program
  3. #include <iostream.h>
  4. #include "org.h"
  5.  
  6. void budget(OrgEntity& oe);
  7.  
  8. main()
  9. {
  10.     Company company("Bilbo Software, Inc.", 35);
  11.     Division div("Vertical Applications", 12);
  12.     Department dept("Medical Practice", 4);
  13.     budget(company);
  14.     budget(div);
  15.     budget(dept);
  16. }
  17.  
  18. void budget(OrgEntity& oe)
  19. {
  20.     cout << "\n---- Budget Report ----\n";
  21.     cout << oe.org_name();
  22.     cout << " $" << oe.number_employees() * oe.office_party();
  23.     cout << '\n';
  24. }               
  25.