// student.cpp #include #include #include using namespace std; #include "student.h" student::student() { }; // {end constructor} student::student(char stu_name[], char stu_phone[], char stu_email[], char stu_add1[], char stu_add2[], char stu_city[], char stu_state[], char stu_zip[], char stu_other[]) { strcpy(name, stu_name); strcpy(phone, stu_phone); strcpy(email, stu_email); strcpy(address1, stu_add1); strcpy(address2, stu_add2); strcpy(city, stu_city); strcpy(state, stu_state); strcpy(zip_code, stu_zip); strcpy(other, stu_other); empty = false; }; // {end constructor} student::~student() { }; // {end destructor} char* student::return_name() { return(name); }; char* student::return_phone() { return(phone); }; char* student::return_email() { return(email); }; char* student::return_add1() { return(address1); }; char* student::return_add2() { return(address2); }; char* student::return_city() { return(city); }; char* student::return_state() { return(state); }; char* student::return_zip() { return(zip_code); }; char* student::return_other() { return(other); }; // clear function // clears the student object void student::clear() { strcpy(name, " "); strcpy(phone, " "); strcpy(email, " "); strcpy(address1, " "); strcpy(address2, " "); strcpy(city, " "); strcpy(state, " "); strcpy(zip_code, " "); strcpy(other, " "); empty = true; }; // {end clear function} bool student::isEmpty() { return(empty); }; void student::update_name(char n[]) { strcpy(name, n); }; void student::update_phone(char p[]) { strcpy(phone, p); }; void student::update_email(char e[]) { strcpy(email, e); }; void student::update_add1(char a1[]) { strcpy(address1, a1); }; void student::update_add2(char a2[]) { strcpy(address2, a2); }; void student::update_city(char c[]) { strcpy(city, c); }; void student::update_state(char s[]) { strcpy(state, s); }; void student::update_zip(char z[]) { strcpy(zip_code, z); }; void student::update_other(char o[]) { strcpy(other, o); }; void student::update_empty(bool status) { empty = status; }