#include "Student.h" using std::endl; // Creates a new student Student::Student() { active = false; } string Student::getName() const { return name; } void Student::setName(string name) { this->name = name; } string Student::getPhone() const { return phone; } void Student::setPhone(string phone) { this->phone = phone; } string Student::getEmail() const { return email; } void Student::setEmail(string email) { this->email = email; } string Student::getStreet() const { return street; } void Student::setStreet(string street) { this->street = street; } string Student::getApt() const { return apt; } void Student::setApt(string apt) { this->apt = apt; } string Student::getCity() const { return city; } void Student::setCity(string city) { this->city = city; } string Student::getState() const { return state; } void Student::setState(string state) { this->state = state; } string Student::getZip() const { return zip; } void Student::setZip(string zip) { this->zip = zip; } string Student::getOther() const { return other; } void Student::setOther(string other) { this->other = other; } bool Student::isActive() const { return active; } void Student::setActive(bool active) { this->active = active; if (active == false) { // Clear everything out name = phone = email = street = apt = city = state = zip = other = ""; } } // Prints a student void Student::print(ostream& out) const { if (!active) return; if (name != "") out << "Name:" << endl << " " << name << endl; if (phone != "") out << "Phone Number:" << endl << " " << phone << endl; out << "Email:" << endl << " " << email << endl; if (street != "" || apt != "" || city != "" || state != "" || zip != "") { out << "Address:" << endl; if (street != "") out << " " << street << endl; if (apt != "") out << " " << apt << endl; if (city != "") out << " " << city; if (city != "" && (state != "" || zip != "")) out << ", "; if (state != "") out << state << " "; if (zip != "") out << zip; if (city != "" || state != "" || zip != "") out << endl; } if (other != "") out << "Other:" << endl << " " << other << endl; out << endl; }