-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathAcademicRecord.h
64 lines (59 loc) · 1.29 KB
/
AcademicRecord.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#pragma once
#include"Student.h"
#include<iostream>
#include<vector>
#include<string>
using namespace std;
class AcademicRecord
{
public:
AcademicRecord()=default;
~AcademicRecord()=default;
//setters
void set_student_marks(float);
void set_student_grades(char);
void set_Attandance_percentage(float);
void set_GCPA(float);
//getters
float get_student_marks(int);
char get_student_grades(int);
float get_Attandance_percentage(int);
float get_GCPA(int);
private:
vector<float> marks;
vector<char> grades;
vector<float> attandance_percentage;
vector<float> CGPA;
};
void AcademicRecord::set_student_marks(float marks)
{
this->marks.push_back(marks);
}
void AcademicRecord::set_Attandance_percentage(float attandacePercentage)
{
this->attandance_percentage.push_back(attandacePercentage);
}
void AcademicRecord::set_GCPA(float CGPA)
{
this->CGPA.push_back(CGPA);
}
void AcademicRecord::set_student_grades(char grades)
{
this->grades.push_back(grades);
}
float AcademicRecord::get_Attandance_percentage(int index)
{
return this->attandance_percentage[index];
}
float AcademicRecord::get_GCPA(int index)
{
return this->CGPA[index];
}
char AcademicRecord::get_student_grades(int index)
{
return this->grades[index];
}
float AcademicRecord::get_student_marks(int index)
{
return this->marks[index];
}