I was given this as a programming assignment and honestly I am quite lost was hoping someone could help
Program Description:
You will open an input file “students.dat” that will contain a list of student names,
classification, and grade in the class. (All student info is completely made up ) You
should read through the entire input file using a loop- you will not know how many
students are in the file. After reading in all information, close the input file and print out
the following information with labels:
● Highest grade in the class
● Lowest grade in the class
● Class average grade (rounded to one decimal place)
● Number of freshmen students
● Number of sophomore students
● Number of junior students
● Number of senior students
Sample input:
Holly Berry freshman 88
Red Johnson sophomore 74
Jeff Bozo freshman 91
Pebble Johnston senior 82
Thomas BradyBunch freshman 63
Eddy Sheen junior 97
Sample output:
Mika Morgan
Highest grade: 97
Lowest grade : 63
Class average: 82.5
Freshmen: 3
Sophomores: 1
Juniors: 1
Seniors: 1
- can you open a file?
- can you read one line from a file?
- can you read all the lines in a file?
In other words, just how far can you get into the problem before you get stuck.
If you want actual help, you need to make an actual effort to show where you can get to by yourself.
Note we're not here to just hand you a complete answer on a plate.