#include "student.h" student::student() { name=""; email="blank_at_vt_dot_edu"; phonenum=""; addyl1=""; addyl2=""; } void student::print(ofstream &ofile) { //Only if not a blank field. if(email!="blank_at_vt_dot_edu") { //Print Name if(name.length()>0) ofile<<"Name:\n "<0) ofile<<"Phone Number:\n "<0||addyl1.length()>0||city.length()>0||state.length()>0||zip.length()>0) { ofile<<"Address:\n"; if(addyl1.length()>0) ofile<<" "<0) ofile<<" "<0) ofile<<" "<0) { //GOod idea, but the curator didn't like it. Guess what wins? if(city.length()>0) //only a comma if there's a city ofile<<", "; else ofile<<" "; ofile<0) { if(city.length()>0) { if(state.length()==0) //only a comma if there's a city ofile<<", "; else ofile<<" "; } else ofile<<" "; ofile<0||state.length()>0||zip.length()>0) ofile<0) ofile<<"Other:\n "<0) name=nname; if(nphonenum.length()>0) { ui test=0; if((nphonenum[0]=='('&&nphonenum[4]==')')&&(nphonenum[5]==' '&&nphonenum[9]=='-')) for(ui i=1;i='0'&&nphonenum[i]<='9')) test++; if(test==10) phonenum=nphonenum; } if(nemail.length()>0) { /* ui i=0; for(;i0) addyl1=naddy1; if(naddy2.length()>0) addyl2=naddy2; if(ncity.length()>0) city=ncity; if(nstate.length()==2) { int test=0; for(int i=0;i<2;i++) if((nstate[i]>='A'&&nstate[i]<='Z')||(nstate[i]>='a'&&nstate[i]<='z')) //State _IS_ actually letters test++; if(test==2) state=nstate; } if(nzip.length()==5) { int test=0; for(int i=0;i<5;i++) if(nzip[i]>='0'&&nzip[i]<='9') test++; if(test==5) zip=nzip; } if(nother.length()>0) other=nother; return 1; }