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
|
#include <string>
#include <cstdlib>
#include "student.h"
using namespace std;
student::student(){ //default student constructor
setGPA();
setCreditHoursCompleted();
setAnticipatedCompletionDate();
setBirthday();
setHomeLocation();
setFirstName();
setLastName();
}
student::student(double a, int b, int c, int d, int e, int f, int g, int h, string i, string j, string k, string l, string m, string n, string o){
setGPA(a);
setCreditHoursCompleted(b);
setAnticipatedCompletionDate(c, d, e);
setBirthday(f, g, h);
setHomeLocation(i, j, k, l, m);
setFirstName(n);
setLastName(o);
}//student constructor
void student::setGPA(){ //default constructor for the GPA
student::gpa = 0.00;
}
void student::setGPA(double x){ //sets GPA to the value
student::gpa = x;
}
void student::setCreditHoursCompleted(){ //default constructor for credit hours
student::creditHoursCompleted = 0;
}
void student::setCreditHoursCompleted(int x){
student::creditHoursCompleted = x;
}
void student::setAnticipatedCompletionDate(){ //default constructor for the date of graduation
student::anticipatedCompletionDate.setDay();
student::anticipatedCompletionDate.setMonth();
student::anticipatedCompletionDate.setYear();
}
void student::setAnticipatedCompletionDate(int x, int y, int z){ //sets values of Date
student::anticipatedCompletionDate.setDay(x);
student::anticipatedCompletionDate.setMonth(y);
student::anticipatedCompletionDate.setYear(z);
}
|