void BusinessInfo::print() const
{
	cout << "Name:       " << getName() << endl;
	cout << "Address:    " << getAddress() << endl;
	cout << "City:       " << getCity() << endl;
	cout << "State:      " << getState() << endl;
	cout << "Zip Code:   " << getZipCode() << endl;
	cout << "Sales Tax:  " << getSalesTax() << "%" << endl;
}
Exemple #2
0
/******************************************************************************
 * outputStudent()
 * 	This method output the student's info
 *****************************************************************************/
string MathStudent::outputStudent(int promptLength)			const
										//The length of the prompt
{
	stringstream output;		//The String Stream Variable

	output << Student::outputStudent(promptLength);
	output << left;

	output << setw(promptLength) << "Student's Address: " 	<< address
															<< endl;
	output << setw(promptLength) << "Student's City:"	  	<< city
															<< endl;
	output << setw(promptLength) << "Student's State:"	  	<< state
							   	 << ", " << getZipCode()    << endl;

	return output.str();




}
// Save current info to BusinessInfo.txt
void BusinessInfo::saveBusinessInfo()
{
	string delimiter = ",";

	fstream outfile;
	outfile.open("BusinessInfo.txt", ios::out);
	outfile << getName() << delimiter << getAddress() << delimiter << getCity() << delimiter << getState() << delimiter << getZipCode() << delimiter << getSalesTax() << delimiter;
	outfile.close();
}