#include #include #include //Five classes derived from class tax: #include "income.h" #include "capital_gains.h" #include "regressive.h" #include "progressive.h" #include "property.h" using namespace std; int main() { const income federal {}; const capital_gains rich {}; const regressive oklahoma {}; const progressive newyork {}; const property yonkers {}; const tax *const a[] { &federal, &rich, &oklahoma, &newyork, &yonkers }; const size_t n {size(a)}; //Do not use scientific notation. //Output money with 2 digits to the right of the decimal point. cout << fixed << setprecision(2); for (int i {0}; i < n; ++i) { //People like to see words left-justified, //numbers right-justified. cout << left << setw(13) << a[i]->get_name() << " " << right << setw(10) << a[i]->amount(100.00) << "\n"; } return EXIT_SUCCESS; }