the only problem kemort is if you get a calculator and calculate the first student. you get 73.8% not 80.5 so ive been thinking it was wrong... is 80.5 right ??
thank you kemort !!! your so smart lmao. ok so now i have my output.txt file yay ! but that is also what is in my ouput on xcode.. i need xcode's output to show this.. so i should have an output.txt of what i just did ! perfect. but that is also showing in xcode. i need whats below in xcode :) any ideas kemort ?
Letter count average attendance
A 2 24.00
B 0 0
C 4 21.50
D 0 0
F 0 0
ID Course Letter
Grade Grade
1 80.5 B-
2 27.5 F
3 97.525 A+
4 96.5075 A
5 80.64 B-
6 89.1775 B+
7 73.84 C
8 91.4825 A-
9 73.5 C
10 77.6 C+
The # of A's: 3
The # of B's: 3
The # of C's: 3
The # of D's: 3
The # of F's: 1
o i see what was different in yours. for that one value over 100 you had an error.. i see. ok that worked for me. thanks ! you teach better than my teacher lmao...
how do i get this to be in my xcodes output:
Letter count average attendance
A 2 24.00
B 0 0
C 4 21.50
D 0 0
F 0 0
but still have everything in my output.txt file as it is ? calculating the avg attendance with resspect to the solid Letter grade no '-'s' or '+'s' is beyond me.. he never taught us this
but i got the right answer for mine. is what you posted above^ the answer to my post about: ?
Don't get me wrong it's your assignment. The point I would make though is if we are working off the same dataset (ie the same small sample) then the last table of output I showed above is correct.
The question of average attendance against the letterGrade hasn't been addressed in 'my' program. All it would mean though is two extra lines in each if block - one for the number of students with that grade and another for the actual attendance score.
The other aspect you need to look at is the dreaded CourseGradePercentage . All it does is duplicate LetterGrade and can be deleted wherever it appears. Up to you.
ya i deleted the CGP. the only reason i had that in is because that is how my teacher labeled it. i may go back and change all the Letter Grade's to the CGP. Well ill study on what you suggested above.
I'm not supposed to have 'The number of A's is:" etc. im suposed to have it how it is counted in my block above. i just wanted to test to see if i can do it.
To calculate the avg. attendance from the data in my inputGrades.txt do i take: AvgAttendance= Attendance/137. Then for the grades i'm going to have to write more if statements correct? that is my last question
Thank you for all your help kemort. seriously, i learned a lot today. I'm sure you feel like takin it easy so i'll try and work the rest out myself tonight and see if i can do it with the tools i've acquired.
ok ill play around with the numX++ . im supposed to have the A+, A-, A, B+ ... etc for my ouput.txt.. but for my output on xcode in the box above it is only the solid letters.
"Finally, your program must count the number of grades in each letter category, and print the average attendance value for each letter grade category to the **screen**. Example output printed to screen:"
awesome thank you man.. last thing lol sorry . I need my 'LetterGrade' to have 2 decimal places only. and my ID should just be the number no decimal but when i try to specify a fixed setprecision just for LetterGrades it also does it to ID. Is there a way to keep ID with no decimal and LetterGrades with setprecision(2) only applied to it ?then i will leave this site i promise lol
Well, ID could be an integer, or just change setprecision as you go along a line or before or after a block to whatever value you want. But integer for ID makes sense.
perfect . i got that to work. For NumX++ you recommended i focus on the num part of it. if i change that will that affect my ouput.txt numbers? also the grade counter that i have at the cottom of the txt file is way off. it says theres like 20 D's and thers not even 10. :/
Don't change num part because it works.
The totals were OK with the sample dataset. You can check that automatically by comparing the total of the categories with the total number of students processed which is not necessarily 137.