Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- #include "Student.h"
- #include "degree.h"
- Student::Student(string studentId, string firstName, string lastName, string emailAddress, int age, int daysInCourse0, int daysInCourse1,int daysInCourse2, DegreeProgram degreeProgram) {
- Student::SetStudentId(studentId);
- Student::SetFirstName(firstName);
- Student::SetLastName(lastName);
- Student::SetEmailAddress(emailAddress);
- Student::SetAge(age);
- Student::SetDaysInCourse(0,daysInCourse0);
- Student::SetDaysInCourse(1,daysInCourse1);
- Student::SetDaysInCourse(2,daysInCourse2);
- Student::SetDegreeProgram(degreeProgram);
- }
- Student::~Student() {
- //delete this->studentID;
- //delete this->firstName;
- //delete this->lastName;
- //delete this->emailAddress;
- //delete this->age;
- delete[] this->daysInCourse;
- //delete this->degreeProgram;
- }
- void Student::SetStudentId(string studentId) { studentId = studentId; }
- void Student::SetFirstName(string firstName) { firstName = firstName; }
- void Student::SetLastName(string lastName) { lastName = firstName; }
- void Student::SetEmailAddress(string emailAddress) { emailAddress = emailAddress; }
- void Student::SetAge(int age) { age = age; }
- void Student::SetDaysInCourse(int daysInCourseValue,int daysInCourseIndex) { daysInCourse[daysInCourseIndex] = daysInCourseValue; }
- void Student::SetDegreeProgram(DegreeProgram degreeProgram) { degreeProgram = degreeProgram; }
- string Student::GetStudentId() {return studentID; }
- string Student::GetFirstName() {return firstName; }
- string Student::GetLastName() { return lastName; }
- string Student::GetEmailAddress() { return emailAddress; }
- int Student::GetAge() { return age; }
- int Student::GetDaysInCourse(int index) { return daysInCourse[index]; }
- DegreeProgram Student::GetDegreeProgram() { return degreeProgram; }
- void Student::Print() {
- cout << studentID << "\t" << " First Name : " << firstName << "\t"
- << " Last Name : " << lastName << "\t" << " Age : " << age
- << "\t" << "daysInCourse : " << "{" << daysInCourse[0] << "," << daysInCourse[1] << "," << daysInCourse[2] << "}" << "\t"
- << "Degree Program : " << degreeProgram << ".";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement