Purpose: The main class for (a prototype of) the ArchRival system.
This class must construct ScoreBoard
objects for two
different events, set-up the ScoreBoard
objects,
iteratively prompt the user to enter information about divers/dives
at the two events, and display that information on the appropriate
ScoreBoard
.
public static ScoreBoard jmu, stanford;
These attributes are public and static to facilitate Web-CAT testing.
ScoreBoard
named jmu
with a title of "JMU Invitational" and 7 judges.
jmu
to "DukeDashAd.png".
jmu
to
"WeatherBitsAd.png".
ScoreBoard
named jmu
.
ScoreBoard
named stanford
with a title of "Stanford Dual Meet" and 4 judges.
stanford
to
"JMUAd.png".
stanford
to
"HarrisonburgAd.png".
ScoreBoard
named stanford
.
System.out
) to enter the following
information (in order):
You may assume that the user will always respond appropriately
(on System.in
) to any
given prompt. The appropriate responses follow.
group half-somersaults half-twists position
The group will be "1" for a forward dive, "2" for a backward
dive, "3" for a reverse dive, and "4" for an inward dive.
half-somersaults and half-twists will be
a String
representation of an int
value
(e.g., 7 half-somersaults for a dive with 3 1/2 somersaults).
The position will be either "A" for straight, "B" for pike,
"C" for tuck, and "D" for free.
Note that this version of the system will not support flying dives. Hence, all dives must be assumed to be non-flying.
String
representations of a
double
-value with or without a decimal point).
Based on the user's responses to these prompts, it must modify the
appropriate ScoreBoard
object as requested.
That is, the response to the "Event:" prompt must be used to select
a particular ScoreBoard
. The responses to the
"Dive:" prompt must be used to construct
a Dive
object. The responses to the "Name:" and "Scores:"
prompts must be used, along with the Dive
object, to change
what is displayed on the appropriate ScoreBoard
(by calling
the showScore()
method). Obviously, since this method
must also be passed a total score, the response to the "Scores:" prompt
must also be used (along with the ScoreCalculator
class)
to calculate the total score.
This process must continue until the user does not enter "Y" in response to the "Continue?" prompt.
shutdown()
method of the two ScoreBoard
objects.
Copyright 2013