Question: C++ Create a CLASS that has all the functionality of the PREVIOUS LAB. i.e., USE YOUR USER-DEFINED FUNCTIONS as the FUNCTION MEMBERS OF YOUR CLASS.

C++

Create a CLASS that has all the functionality of the PREVIOUS LAB.

i.e., USE YOUR USER-DEFINED FUNCTIONS as the FUNCTION MEMBERS OF YOUR CLASS.

WRITE A PROGRAM THAT USES ALL THE FUNCTIONALITY of THE CLASS and OUTPUTS the RESULTS.

Student1 6 3 5 9 4 2 8 6 5 8 Student2 9 9 7 8 7 9 8 6 8 9 Student3 2 3 5 1 6 4 2 3 6 5

Screenshot

C++ Create a CLASS that has all the functionality of the PREVIOUS

Code

#include #include #include #include

using namespace std;

struct SG { float arraySG[10]; string name; char LG; }; class Grade { public: SG Data[10]; int i, j, total,count; Grade() { i=0; j=0; total = 0; count=0; readFromFile(); } void readFromFile() { char line[20]; //considering max size of any line in file is 20 character. change if required. FILE *fileRead = fopen("scores.txt", "r"); //r means opening file in read mode if(fileRead == NULL) //NULL means either file does not exists or there is no permission to open file { cout= 10, I have given P. Please change it }

//show details on screen for(i=0; i

LAB. i.e., USE YOUR USER-DEFINED FUNCTIONS as the FUNCTION MEMBERS OF YOUR

scores.txt - Notepad File Edit Format View Studenti Help ou Nowo Student2 Student3 5 9 4 2 6 5 8 P Studenti 6 3 Student2 9 9 Student3 2 3 000 7 8 7 9 6 8 9 5 1 6 4 2 3 6 5 P

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!