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
0
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.
Thread starter Similar threads Forum Replies Date
H Apps General Discussion 3
A Apps General Discussion 6
B Apps General Discussion 1
L Apps General Discussion 3
C Apps General Discussion 2
AndrewFreedman Apps General Discussion 1
Y Apps General Discussion 1
U Apps General Discussion 7
henrytcasey Apps General Discussion 1
EliteSmore Apps General Discussion 2
T Apps General Discussion 1
H Apps General Discussion 1
G Apps General Discussion 4
J Apps General Discussion 1
H Apps General Discussion 19
S Apps General Discussion 5
J Apps General Discussion 2
G Apps General Discussion 3
pinaklonkar Apps General Discussion 1
P Apps General Discussion 3

ASK THE COMMUNITY