test
This commit is contained in:
parent
37776af5db
commit
ab03d5f10c
4045 changed files with 286212 additions and 3 deletions
68
.config/Code/User/History/55863ed9/UiLf.cpp
Normal file
68
.config/Code/User/History/55863ed9/UiLf.cpp
Normal file
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class Student{
|
||||
int stdID;
|
||||
string name;
|
||||
string *courseCodes;
|
||||
int numOfCourses;
|
||||
int *courseGrades;
|
||||
float gpa;
|
||||
|
||||
public:
|
||||
|
||||
int getStdID(){
|
||||
return stdID;
|
||||
}
|
||||
string getName(){
|
||||
return name;
|
||||
}
|
||||
string getCourseCodes(int i){
|
||||
return courseCodes[i];
|
||||
}
|
||||
int getNumOfCourses(){
|
||||
return numOfCourses;
|
||||
}
|
||||
int getCourseGrade(int i){
|
||||
return courseGrades[i];
|
||||
}
|
||||
float getGPA(){
|
||||
return gpa;
|
||||
}
|
||||
|
||||
void setStdID(int stdID){
|
||||
this->stdID = stdID;
|
||||
}
|
||||
void setName(string name){
|
||||
this->name = name;
|
||||
}
|
||||
|
||||
void setCourseGrade(string courseCode, int grade){
|
||||
for(int i=0;i<numOfCourses;i++){
|
||||
if(courseCodes[i] == courseCode){
|
||||
courseGrades[i] = grade;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void addCourse(string courseCode, int grade){
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
int main(){
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue