1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
#include <iostream>
#include "box.h"
using namespace std;
int main(void)
{
Box mybox1(1,'*','<');
Box mybox2(2,'^','!');
Box mybox10(10,'#','@');
Box mybox39(39, '*','&');
cout << "Draw a box of size 1, with * border and < fill" << endl;
mybox1.Draw();
cout << "Try to shrink Box1, see if it stays at 1, Print Summary " << endl;
mybox1.Shrink();
mybox1.Summary();
cout << "Try to change Border to a space, make sure it goes back to default of #" << endl;
mybox1.SetBorder(' ');
mybox1.Draw();
cout << "Draw a box of size 2, with ^ border and ! fill" << endl;
mybox2.Draw();
mybox2.Shrink();
cout << "Shrink Box of Size 2, see if it goes to 1,Print Summary" << endl;
mybox2.Summary();
cout << "Draw a box of size 10, with # border and @ fill" << endl;
mybox10.Draw();
cout << "Grow Box of size 10, see if it goes to 11, Print Summary" << endl;
mybox10.Grow();
mybox10.Summary();
cout<< "Try to set the fill character to a space, make sure it goes to the default of *" << endl;
mybox10.SetFill(' ');
mybox10.Draw();
cout << "Draw a box of size 39, with * border and & fill" << endl;
mybox39.Draw();
cout << "Grow a box of size 39, see if it stays at 39, print summary"<< endl;
mybox39.Grow();
mybox39.Summary();
return 0;
}
|