Need help on C++ program.The program requires a program for reporting grades for
ID: 3780354 • Letter: N
Question
Need help on C++ program.The program requires a program for reporting grades for a class. Your program should read in an input file of student grades records, and it should produce an output file of student grades records plus a report (output to monitor) of grade distributions. Your program would read in the records from the file one record at a time (sequentially) and output one record at a time to the output file, it update an array of grades. After building the array of grades, then it processes the array to print the grade distributions histogram. The program will also build array each student score in the class and then sort it (use bubble sort) then out put the LOWEST SCORE IN CLASS, HIGHEST SCORE IN CLASS, and NUMBER OF STUDENTS. I'm using visual studio 2015
Explanation / Answer
//*************************************************************** // HEADER FILE USED IN PROJECT //**************************************************************** #include #include #include #include //*************************************************************** // CLASS USED IN PROJECT //**************************************************************** class student { int rollno; char name[50]; int p_marks, c_marks, m_marks, e_marks, cs_marks; float per; char grade; void calculate(); //function to calculate grade public: void getdata(); //function to accept data from user void showdata(); //function to show data on screen void show_tabular(); int retrollno(); }; //class ends here void student::calculate() { per=(p_marks+c_marks+m_marks+e_marks+cs_marks)/5.0; if(per>=60) grade='A'; else if(per>=50) grade='B'; else if(per>=33) grade='C'; else grade='F'; } void student::getdata() { coutrollno; coutRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.