Question: In Java Write a method countMajors(String filename) that reads the data in filename and returns a Map as described above. Feel free to use the
In Java
Write a method countMajors(String filename) that reads the data in filename and returns a Map
lastname,firstname,major
Heres an example of a situation thats well-suited for using the map data structure. Suppose you have a data file of students at a university, and youre trying to figure out how many students are in each major. You can read the file and parse the information into a map, where the keys are the majors and the values are the counts of how many students are in that major.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
