Cosc 1C
ASSIGNMENT 1C
Assignment 1C tests your knowledge of Sets and Maps (Chapter 21).
Design a program/project/driver class (the program/project/driver class file should be called YourNameAssignment1C; replace YourName with your actual name) with the following exact/precise1 functionality, and names (replace YourName with your actual name or the name you go by, no spaces):
▪ Create an ordered map data structure called YourNameMap (any type of map introduced in Chapter 21 like Map, LinkedListMap, or TreeMap - use your knowledge of the chapter and problem at hand to decide which type is better for this particular problem).
▪ Read the data from the Assingment1CData.txt file (that contains Census data for different US geographical areas). The format of the data is the following:
Area, State Population2
and store the State – Total Population data into YourNameMap with the State as a key and Total Population (the total from all the geographical areas from that state) as a value3. You should read the file only once and use your YourNameMap to keep track of the state population for the geographical area you have read/processed (so far).
▪ Print the values from YourNameMap in alphabetical order of the states in a table format with first column for the state and second column for the total population.
Create a Microsoft Word document called YourNameAssignment1C-Screenshot.docx. (replace YourName with your actual name) that contains screenshots of the editor window showing the entire JAVA source code in editor and the entire output. If the entire class JAVA source code or the output does not fit in one screenshot or the screenshots cannot be easily read, create multiple screenshots and add them to the same document.
Submit YourNameAssignment1C.java JAVA source code file and YourName-Assignment1C-Screenshots.docx Microsoft Word screenshots document on eCampus under the Assignment 1C. Do not archive the files (no ZIP, no RAR, etc) or submit other file formats. Review the files in your eCampus submission confirmation window.
1 Use the exact names (spelling, caps). You are not going to earn any credit if the classes and methods do not contain your actual name and have the exact/precise names and functionality. 2 Separated by “, “ and tab 3 For example, for Texas, when you read the first entry “Houston city, Texas 2320268 “ you are going to add Texas-2320268 to your map, and for the rest of the areas just update the total population store in your map, thus, when you read “San Antonio city, Texas 1547253” you are going to add 1547253 to the value from the map and get 3867521, then when read “Dallas city, Texas 1343573” add 1343573 to the value and get 5211094, and so on until you finish reading the file.