Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Azure SQL Database For Modern Developers Building Applications In The Microsoft Cloud

Authors: Davide Mauri, Silvano Coriani, Anna Hoffma, Sanjay Mishra, Jovan Popovic

1st Edition

1484263693, 978-1484263693

More Books

Students also viewed these Databases questions

Question

8. Describe how cultural spaces are formed.

Answered: 1 week ago