#include #include "bug1.h" using namespace std; // implementation file for class Buggy // constructor. Dynamically creates the array and fills all cells with 0. Buggy::Buggy(int size) { horse = new int[size]; for (int i = 0; i < size; i++) horse[i] = 0; } // fills all cells of the array with the same value void Buggy::fill(int hay) { for (int i = 0; i < size; i++) horse[i] = hay; } // prints out the contents of the array void Buggy::print() { for (int i = 0; i < size; i++) cout << horse[i] << " "; cout << endl; }