This is the source file for the Cleaners1 project

Header File: Order.h

#if !defined CLEANINGORDER_H_#define CLEANINGORDER_H_class CleaningOrder{private:	int NumberOfShirts;	int NumberOfPants;	int NumberOfOtherItems;	double PriceShirt;	double PricePants;public:	void setNumberOfShirts(int n);	int getNumberOfShirts();	void setNumberOfPants(int n);	int getNumberOfPants();	void setNumberOfOtherItems(int n);	int getNumberOfOtherItems();	void setPriceShirt(double p) { PriceShirt = p; }	double getPriceShirt() { return PriceShirt; }	void setPricePants(double p) { PricePants = p; }	double getPricePants() { return PricePants; }	void ProcessOrder();	void DisplayReceipt();	double TotalOtherItems;	double CalcPriceShirts() const;	double CalcPricePants() const;	void CalcPriceOtherItems(int n);	double CalcTotalOrder() const;};#endif // CLEANINGORDER_H_

Source File: Order.cpp

#include <iostream>using namespace std;#include "Order.h"void CleaningOrder::setNumberOfShirts(int n){	if( n <= 0 )		NumberOfShirts = 0;	else		NumberOfShirts = n;}int  CleaningOrder::getNumberOfShirts(){	if( NumberOfShirts <= 0 )		return 0;	else		return NumberOfShirts;}void CleaningOrder::setNumberOfPants(int n){	NumberOfPants = (n <= 0) ? 0 : n;}int  CleaningOrder::getNumberOfPants(){	return (NumberOfPants <= 0 ? 0.00 : NumberOfPants);}void CleaningOrder::setNumberOfOtherItems(int n){	NumberOfOtherItems = (n <= 0 ? 0 : n); }int  CleaningOrder::getNumberOfOtherItems(){	return (NumberOfOtherItems <= 0 ? 0.00 : NumberOfOtherItems);}double CleaningOrder::CalcPriceShirts() const{	return NumberOfShirts * PriceShirt;}double CleaningOrder::CalcPricePants() const{	return NumberOfPants * PricePants;}void CleaningOrder::CalcPriceOtherItems(int n){	if( n > 0 )	{		double Sum = 0, P;				cout << "\nEnter the price for each misc item\n";		for(int i = 0; i < n; ++i)		{			cout << "Price for item " << i + 1 << ": $";			cin >> P;			Sum += P;		}		TotalOtherItems = Sum;	}	else		TotalOtherItems = 0.00;}double CleaningOrder::CalcTotalOrder() const{	return CalcPriceShirts() + CalcPricePants() + TotalOtherItems;}

Source File: Main.cpp

#include <iostream>#include <iomanip>using namespace std;#include "Order.h"int main(){	CleaningOrder Order;	int QtyShirts, QtyPants, QtyOthers;	// Get the number of items	cout << "How many shirts? ";	cin >> QtyShirts;	cout << "How many Pants? ";	cin >> QtyPants;	cout << "How many other items? ";	cin >> QtyOthers;	Order.CalcPriceOtherItems(QtyOthers);	Order.setNumberOfShirts(QtyShirts);	Order.setNumberOfPants(QtyPants);	Order.setNumberOfOtherItems(QtyOthers);	Order.setPriceShirt(0.95);	Order.setPricePants(1.75);	cout << setiosflags(ios::fixed) << setprecision(2);	// Display the receipt	cout << "\n======================================="		 << "\nGeorgetown Cleaning Services - Receipt"		 << "\n---------------------------------------"		 << "\nQty\tItem\tUnit\tSub-Total"	     << "\n" << Order.getNumberOfShirts() << "\tShirts\t$"		 << Order.getPriceShirt() << "\t$" << Order.CalcPriceShirts()	     << "\n" << Order.getNumberOfPants() << "\tPants\t$"		 << Order.getPricePants() << "\t$" << Order.CalcPricePants()	     << "\n" << Order.getNumberOfOtherItems() << "\tOthers\t"		 << "Vary\t$" << Order.TotalOtherItems		 << "\n---------------------------------------"		 << "\nTotal Order: $" << Order.CalcTotalOrder()		 << "\n=======================================";	cout << "\n\n";	return 0;}