The next n lines contain student answers in the first30 consecutive character po
ID: 3613124 • Letter: T
Question
The next n lines contain student answers in the first30 consecutive character positions, followed by the student’sname in the next 10 character positions.
Use a class to implement this project. Uses the main functionprovided and pass control to the function test in Exam. There theuser can be prompted for a file name with other processing thatneeds to be done so the test method will be fairly long. Store eachline of student information in the array. Have at least twomore methods in the class.
Name your file that contains the main function ExMain.cpp andyour header file exam.h .
Hints :
You may make modifications in this but must use a classcontaining an array for this project.
#include <String>
struct StudentData
{
String grades;
String name;
char result; //pass orfail
}
class Exam
{
//public:
void test();
private:
StudentData ary[100];
void Exam::test()
{
cout << "Am in memberfunction test."<< endl;
}
This is a start for your program and must be modified tomeet project requirements. It does show how to instantiate theclass and invoke a method
#include "Exam.h"
#include <iostream>
using namespace std;
int main()
{
Exam E;
E.test();
return 0;
}
Your program will be tested with files similar to thisone.
ABCABCABCABCABCABCABCABCABCABC 4
ABCABCABCABCABCABCABCABCABCABCDE Mathews
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAABilly Fold
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBSpring Tim
ABZABZABZABZABZABZAAABBBCCCAAAMA Simpson