Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Instructor.h"
- #include <iostream>
- #include <fstream>
- using namespace std;
- Instructor::Instructor(){
- instructorOneCorrect=0;
- instructorTwoCorrect=0;
- overallCorrect=0;
- }
- void Instructor::LoadData(int pubAnswers[2][4][16][100])
- {
- for(int x=0;x<2;x++)
- for(int y=0;y<4;y++)
- for(int z=0;z<16;z++)
- for(int i=0;i<100;i++)
- {
- RawData[x][y][z][i]=pubAnswers[x][y][z][i];
- }
- }
- ///////////////////////////////////////////////////////////////////////
- void Instructor::findAllCorrect(){
- for(int x=0;x<2;x++)
- for(int y=0;y<4;y++)
- for(int z=0;z<16;z++)
- for(int i=0;i<100;i++)
- {
- overallCorrect =+ RawData[z][y][z][i];
- instructorOneCorrect =+ RawData[0][y][z][i];
- instructorTwoCorrect =+ RawData[1][y][z][i];
- }
- }
- ///////////////////////////////////////////////////////////////////////
- void Instructor::writeReportIn(){
- ofstream output;
- output.open("Instructor Reports.txt");
- output<<"The total answers correct is "<<overallCorrect<<" out of 12800"<<endl;
- output<<"The first instuctor's students got "<<instructorOneCorrect<<" out of 6400"<<endl;
- output<<"The second instuctor's students got "<<instructorTwoCorrect<<" out of 6400"<<endl;
- output.close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement