Many sports have constants embedded in their rules. For example, baseball has 9 innings, 3 outs per

Question:

Many sports have constants embedded in their rules. For example, baseball has 9 innings, 3 outs per inning, 3 strikes in an out, and 4 balls per walk. We might encode the constants for a program involving baseball as follows:

public static final int INNINGS = 9;
public static final int OUTS_PER_INNING = 3;
public static final int STRIKES_PER_OUT = 3;
public static final int BALLS_PER_WALK = 4;

For each of the following popular sports, give Java named constants that could be used in a program involving that sport:

Basketball

American football

Soccer

Cricket

Bowling

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: