// Project 2 for CS 1704 Spring 2004 // // Programmer: Deborah A Thompson // OS: Windows XP Professional // System: Pentium III 500, 256 MB Memory // Compiler: Visual C++ 6.0, Service Pack 4 // Last modified: Febraury 23, 2004 // // Purpose: This file will provide access functions to private data // to update/view the information. Additionally, each student should // be able to print to the log stream in described format. // #include "Student.h" //////////////////////////////////////////////////////////////// Student // constructor for student class, sets defaults // // Parameters: // NONE // // Pre: None // // Post: Student information is set to default // // Returns: nothing // // Called by: // Calls: None // Student::Student() { //sets all to default values Name = DEFAULT; Phone = ""; Email = DEFAULT; sAddress.Street = DEFAULT; sAddress.Apt = DEFAULT; sAddress.City = DEFAULT; sAddress.State = DEFAULT; sAddress.Zip = DEFAULT; sAddress.Entry = false; Other = DEFAULT; } //////////////////////////////////////////////////////////////// ~Student // default deconstructor // // Student::~Student() { //empty cause no dynamic data } //////////////////////////////////////////////////////////////// Update // updates, changes student information // // Parameters: // inName - student name that is read in // inPhone - student phone number that is read in // inEmail - student email that is read in // inAddress - student address that is read in // inOther - student other information that is read in // // Pre: student data file read in // // Post: student values are set in database // // Returns: nothing // // Called by: // Calls: none // void Student::Update(string inName, string inPhone, string inEmail, Address inAddress, string inOther) { Name = inName; Phone = inPhone; Email = inEmail; sAddress = inAddress; Other = inOther; return; } //////////////////////////////////////////////////////////////// ViewEmail // return's student email address // // Parameters: // None // // Pre: Student information read into student array // // Post: None // // Returns: student's email address // // Called by: // Calls: None // // views student email string Student::ViewEmail() { return Email; } //////////////////////////////////////////////////////////////// ViewAll // allows for all student values to be used, seen // // Parameters: // inName - student name that is read in // inPhone - student phone number that is read in // inEmail - student email that is read in // inAddress - student address that is read in // inOther - student other information that is read in // // Pre: student information set from values from files // // Post: None // // Returns: None // // Called by: // Calls: None // void Student::ViewAll(string& inName, string& inPhone, string& inEmail, Address& inAddress, string& inOther) { inName = Name; inPhone = Phone; inEmail = Email; inAddress = sAddress; inOther = Other; return; }