// Project 2 for CS 1704 Spring 2004 // // Programmer: John Puckett // OS: Windows XP Professional // System: Pentium 4 2.4Ghz, 1 GB Memory // Compiler: Visual C++ 7.1, Service Pack 4 // Last modified: February 24, 2004 // // Purpose // This program reads a list of student names and items from two input files // creates 2 arrays from the data, then uses another input file to run different // algorithms on the arrays // // The program then writes the given commands and the results to // an output file #include #include #include"students.h" using namespace std; student::student() { name = " "; phone = "7035698461"; email = "none"; address1 = " "; address2 = " "; city = " "; state = " "; zipCode = "66666"; info = "W00T"; } student::~student() {} //Modifier methods void student::updateName(string newname) { name = newname; } void student::updatePhone(string newphone) { phone = newphone; } void student::updateEmail(string newemail) { email = newemail; } void student::updateAdd1(string newaddress1) { address1 = newaddress1; } void student::updateAdd2(string newaddress2) { address2 = newaddress2; } void student::updateCity(string newcity) { city = newcity; } void student::updateState(string newstate) { state = newstate; } void student::updateZip(string newzipcode) { zipCode = newzipcode; } void student::updateInfo(string newinfo) { info = newinfo; } //Accessor methods string student::getName() const { return name; } string student::getPhone() const { return phone; } string student::getEmail() const { return email; } string student::getAdd1() const { return address1; } string student::getAdd2() const { return address2; } string student::getCity() const { return city; } string student::getState() const { return state; } string student::getZip() const { return zipCode; } string student::getInfo() const { return info; } bool student::hasAdd() const { if(address1 != " ") return true; if(address2 != " ") return true; if(city != " ") return true; if(state != " ") return true; if(zipCode != "66666") return true; return false; }