- -1of 1 vote
The input is being read in from a file called input.txt, in this format: 22|Data Structures|45- nik in India
Each line consists of three fields "Student ID," "Subject," and "Marks." "Student ID" and "Marks" are integers and "Subject" is a string that does not contain '|' or newlines. There can be any number of students and up to 6 subjects. The fields are separated by the '|' character.
Currently, the existing program reads the input and creates an ArrayList<String> from the lines of input. Then it calls a method processData on this ArrayList, and prints the returned data to the output file. Unfortunately, processData currently does not do anything useful - it just returns an empty `Map.
You have to modify processData to compute the marks scored in each subject by the student with the lowest ID (who has actually appeared for that test). Thus, processData will returns a Map that maps each Subject to the marks scored. In other words, the map will contain each subject name as a key, and the marks scored by the student with the lowest ID as the value for that entry.
If your program is run with the input given above, it should produce the following output:
Data Structures: 45
Please read this expected output carefully to understand exactly what you're expected to compute.
Plz help me solve urgent.
| Report Duplicate | Flag | PURGE
Java Developer Java
Do you Need Voodoo Spell For love, revenge or voodoo spells for cheaters? Consult Free right away to get custom ...
ElenaKudaeva455, Music Piano Store at xyz
Hello Everyone,My name is Elena Kudaeva From NV,Nevada,USA.I am 16 years of age and I have ...
Had moderate success buying and selling weebles in Ohio. Had some great experience buying and selling wooden trains on Wall ...
I am a professor, I have 5 years of experience. I have seen a lot of cases in my life ...
Discover the best preschool for kids Charlotte. Visit Pal-A-Roo’se, one of the trusted early childhood & child development center in ...
SandyBMartinez, iOS Developer
Searching for a simple and delicious homemade treats for dogs?Visit Healthy Dog treats online store and shop the best ...
RocioNavarro189, None at Student
Hello Everyone,My name is Rocio Navarro Form Auckland,NZ,and 31 years old.I am searching for a servant ...
pamelacochran447, Intern at design
I am Pamela Cochran, and I am working as a Manager in Compact Disc Center. Last Month, I searched for ...
ChristinaDDooley, Tech Lead at Car Rental
Rent the stylish, royal & Luxury Cars in Miami.We have become known worldwide by providing Luxury car rental Miami and ...