-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
23e25d8
commit 071dd6e
Showing
18 changed files
with
1,494 additions
and
99 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#include <iostream> | ||
#include <cstdlib> | ||
#include "Stress_ball.h" | ||
|
||
using namespace std; | ||
|
||
int main() | ||
{ | ||
srand(time(NULL)); | ||
|
||
cout << "Default constructor test:\n"; | ||
Stress_ball arr_test; | ||
Stress_ball arr_test[5]; | ||
for(int i = 0; i < 5; i++){ | ||
arr_test[i] = Stress_ball(); | ||
cout << i << ": " << arr_test[i] << endl; | ||
} | ||
|
||
cout << "\nTwo arg constructor test:\n"; | ||
Stress_ball test2(Stress_ball_colors::red, Stress_ball_sizes::small); | ||
cout << test2 << endl; | ||
|
||
Stress_ball test3(Stress_ball_colors::green, Stress_ball_sizes::large); | ||
cout << test3 << endl; | ||
|
||
cout << "\nCompare stress balls:\n"; | ||
for (int i = 0; i < 5; i++) { | ||
if (arr_test[i] == test2) { | ||
cout << "arr_test[" << i << "] equal test2\n"; | ||
} else if (arr_test[i] == test3) { | ||
cout << "arr_test[" << i << "] equal test3\n"; | ||
} else { | ||
cout << "arr_test[" << i << "] not equal test2 nor test3\n"; | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.