Description
Provided is CSCD211Lab1.java that is an unchangeable Java file. Your task is to complete the program based
on the provided main. Some specifications are below; however most of the information is in the provided API.
Program flow is
• prompt the user for the name of the input file.
• open that file and count the number of records in the file
• create and fill an array of type person for each record that is in the file.
• The array is then sorted by calling the compareTo of Person
• A menu is displayed – specifications are below
o Specific methods based on the menu choice
File Specifications
Information on each individual will be in the following format (all lines in the file will end with a carriage
return):
First name
Last name
Favorite color
Example
bubba
von bigbelly
green
sally sue
sullivan
purple
faith
hillstrom
purple
NOTES
• You must range check all values
• You must ensure the parameterized type of Person is passed to compare/compareTo
• You need to capitalize the name when you print out the name
• All parameters will be final and all preconditions will be checked
• FileUtils, SortUtils and SearchUtils classes are provided and must be used.
• You must create an input file that allows you to sufficiently test the specifications of this assignment.
• I have provided the Javadocs from the solution. Please see index.html inside the doc folder.
TO TURN IN
A zip file, in Canvas of the folder Lab1-Enums containing:
• all java files and packages
• the input file(s) used to test your program program
• a test run named cscd211lab1out.txt – testing all aspects
• We should be able to download the zip and compile your code, and then run your code.
Name your zip, your last name first letter of your first name lab1.zip (Example: steinerslab1.zip)