For this first week, I am going to be super nice and just give you the definitions of the classes. What I want you to focus o

Status
Not open for further replies.

Billy_92

Prominent
Apr 5, 2017
2
0
510
For this first week, I am going to be super nice and just give you the definitions of the classes. What I want you to focus on is the interactions between objects.

From now on you are mega hella super required to turn in ONLY A ZIPPED DEBUGLESS PROJECT FOLDER. Failure to comply will result in a big fatty zero. Yes, procedure does matter at an actual job. No solutions, no rars, no github links.

So, main will have a Ball, a Batter, and a Fielder. The Batter is going to swing at the ball and then the Fielder is going to try and catch it. The key takeaway here is that the Ball was changed by the Batter so when the Fielder saw it later it was still changed.

Ball
int mDistanceHit

Batter
// Prompt (with your GetGoodInt) for a number from 1 to 3 for the strength of the swing.
// There is a (Strength * 15) percent chance the ball is hit only 5 feet. Otherwise the ball is hit a random number between 5 and (150 * Strength) feet.
// cout the distance, and make sure to set that number in the ball.
void SwingAtBall( Ball *tBall );

Fielder
// If the ball has a distance of more than 100, print that it is a hit. Otherwise print that is an out.
void FieldBall( Ball *tBall );
 
Status
Not open for further replies.