/*********************************************************************\ This Header written by James P. Harmison for the educational purpose of modifying the Marine Biology Case Study issued by the College Board. \*********************************************************************/ #include #include "display.h" #include "environ.h" #include "fish.h" #include "utils.h" Display::Display() {} void Display::Show(const Environment & env) { const int WIDTH = 1; int rows = env.NumRows(), cols = env.NumCols(), r, c; Fish temp; for (r = 0; r < rows; r++) { for (c = 0; c < cols; c++) { temp = env.FishAt(Position(r,c)); if (temp.IsUndefined()) cout << setw(WIDTH) << ' '; else cout << setw(WIDTH) << temp.ShowMe(); } cout << endl; } }