The complete specification of assignment #6 can be found as part of the stream at iTunes.
Implement the NameSurferEntry class
The NameSurferEntry class encapsulates the information pertaining to one name in the database. That information consists of two parts:
- The name itself, such as “Sam” or “Samantha”
- A list of 11 values indicating the rank of that name in each of the decades from 1900
to 2000, inclusiveThe class definition begins with a constructor that creates an entry from the line of data
that appears in the NamesData.txt file. For example, the entry for Sam looks like this:Sam 58 69 99 131 168 236 278 380 467 408 466The idea behind the design of this constructor is that it should be possible to read a line of data from the file and then create a new entry for it using code that looks like this:
String line = rd.readLine(); NameSurferEntry entry = new NameSurferEntry(line);