v1 of their forScore application (which was named IndividualScorer) worked with a hard-coded competition structure. v2 of the forScore application (which is named PeopleScorer) must read the competition structure and scores from a file.
.div
Files
PeopleScorer
Command-Line Application
Dive
class
DiversList
class
DivFileReader
class
.div
Files
PeopleScorer
class. Your tests must be in a package
named testing
and each test class must include
the word "Test" in its name.
Note that it will be difficult to test the DivFileReader
class directly. Instead, you will need to test it by ensuring that the
objects it constructs (i.e., the Dive
and DiversList
objects) are correct. Since
each module can't be tested in isolation, this is a form of
integration testing.
Dive
class.Dive
class.Dive
class.DiversList
class.DiversList
class.DiversList
class.readDive()
method in the
DivFileReader
class.readDiversList()
method in
the DivFileReader
class.readDiversList()
method in the
DivFileReader
class.readDiversList()
method (and,
indirectly, the readDive()
method).
.zip
file that contains:
DifficultyTable1mS
class but not including
the PeopleScorer
class).testing
).Do not submit the data files, they will be provided by the autograder in the appropriate location (as discussed below).
There is no limit on the number of submissions and no penalty for excessive submissions.
Note that some criteria are described as being "Success Required". This means that Gradescope will not assess subsequent criteria unless these criteria are satisfied (and you will receive a grade of 0 for those criteria). So, for example, if your code does not conform to the style guide then it will not be assessed using any subsequent criteria and you will receive a grade of 0.
As always, points will be deducted for code that is unclear, inelegant, and/or poorly documented.
BufferedReader
(rather than
a Scanner
) you will read an entire record (including
the newline character) using the readLine()
method. You will then tokenize the entire record using
a StringTokenizer
or the split()
method
in the String
class.
.zip
file containing the data
files into the downloads
directory/folder that you
created for this course. You should then unzip them in that same
directory.
After you have unzipped the data files you must open a file
explorer or finder, select all of the files, and drag them into
Eclipse. Specifically, you must drag them into the project (not
the src
directory/folder or anything underneath
it).
Then, in your code that needs to use these files (e.g., your tests),
you should use only the file name (i.e., do not include a path).
For example, you might construct a BufferedReader
named
in
as follows:
BufferedReader in = new BufferedReader(new FileReader("ST_Complete_01.div"));
It is possible to put the data files elsewhere, but then, when you submit your solution, your code will not be able to find them. In other words, for your code to work both on your computer and on the submission system, the data files must be dragged into the Eclipse project.
bad_length_01.div
and
bad_length_02.div
contain dives in which the number
of scores is not consistent with the number of judges. You should
use these files when testing for
the IllegalArgumentException
.
Copyright 2024