Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Student.h"
- #include "Instructor.h"
- #include "Exam.h"
- #include "course.h"
- #include <iostream>
- #include <Windows.h>
- #include <ctime>
- using namespace std;
- void main(){
- //Variables Used
- srand(time(0));
- int tempKids[2][4][16][100];
- int tempE[100];
- int temp;
- int tempA[100][2];
- int tempB[100][2];
- int tempC[100][2];
- int tempD[100][2];
- int tests[4]={0,0,0,0};
- //Creates Classes
- Students kids[2][4][16];
- Exam A[4];
- //Gets key for each test
- A[0].getKey(tempA);
- A[1].getKey(tempB);
- A[2].getKey(tempC);
- A[3].getKey(tempD);
- //writes Exams to txt
- for(int i=0;i<4;i++)
- A[i].writeExam(i);
- //gets Versions of the test and sets the Key for each student
- for(int x=0; x<2; x++)
- for(int y=0;y<4;y++)
- for(int z=0;z<16;z++)
- {
- temp = x+(16*y)+(64*z);
- kids[x][y][z].getVersion(temp);
- }
- //Checks the answers for all the kids
- for(int x=0; x<2; x++)
- for(int y=0;y<4;y++)
- for(int z=0;z<16;z++)
- {
- switch(kids[x][y][z].getSN()){
- case 0:
- kids[x][y][z].checkAnswers(tempA);
- kids[x][y][z].getCorrect(tempE);
- A[0].findCorrect(tempE);
- kids[x][y][z].checkGrade();
- break;
- case 1:
- kids[x][y][z].checkAnswers(tempB);
- kids[x][y][z].getCorrect(tempE);
- A[1].findCorrect(tempE);
- kids[x][y][z].checkGrade();
- break;
- case 2:
- kids[x][y][z].checkAnswers(tempC);
- kids[x][y][z].getCorrect(tempE);
- A[2].findCorrect(tempE);
- kids[x][y][z].checkGrade();
- break;
- case 3:
- kids[x][y][z].checkAnswers(tempD);
- kids[x][y][z].getCorrect(tempE);
- A[3].findCorrect(tempE);
- kids[x][y][z].checkGrade();
- break;
- }
- }
- //finds the statistics of answers for all and per section for exam class
- /*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<4; i++)
- {
- kids[x][y][z].getCorrect(tempE);
- A[i].findCorrect(tempE);
- A[i].correctSec(tempE);
- kids[x][y][z].checkGrade();
- //gets all the correct and incorrects
- for(int i=0;i<100;i++)
- tempKids[x][y][z][i]=tempE[i];
- //kids[x][y][z].getCorrect(tempE);
- kids[x][y][z].StudentWrite(i);
- }*/
- //Checks grades for students
- kids[1][0][3].StudentWrite(0);
- kids[0][2][13].StudentWrite(1);
- kids[1][1][15].StudentWrite(2);
- kids[0][3][2].StudentWrite(3);
- Instructor Kim;
- Kim.LoadData(tempKids);
- for(int i=0; i<4; i++)
- A[i].WriteResults(i);
- //Write Reports
- //for(int i=0;i<4;i++)
- //kids[2][4][i].StudentWrite(i);
- course Kiwi(tests);
- Kiwi.courseWrite();
- Kim.writeReportIn();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement