This is the source file for the Cleaners4 project

Header File: Orders.h

#if !defined CLEANINGORDER_H_#define CLEANINGORDER_H_#include "Date.h"class CleaningOrder{public:	CleaningOrder();	CleaningOrder(int s, int p, int o);	~CleaningOrder();private:	int    NumberOfShirts;	int    NumberOfPants;	int    NumberOfOtherItems;	double PriceShirt;	double PricePants;	Date OrderDate;public:	void setNumberOfShirts(const int n);	int  getNumberOfShirts() const;	void setNumberOfPants(const int n);	int  getNumberOfPants() const;	void setNumberOfOtherItems(const int n);	int  getNumberOfOtherItems() const;	void   setPriceShirt(const double p) { PriceShirt = p; }	double getPriceShirt() const { return PriceShirt; }	void   setPricePants(const double p) { PricePants = p; }	double getPricePants() const { return PricePants; }	double TotalOtherItems;	double CalcPriceShirts() const;	double CalcPricePants() const;	void   CalcPriceOtherItems(int n);	double CalcTotalOrder() const;	void ProcessOrder();	void DisplayReceipt() const;};#endif // CLEANINGORDER_H_

Source File: Orders.cpp

#include <iostream>#include <iomanip>using namespace std;#include "Orders.h"CleaningOrder::CleaningOrder()	: NumberOfShirts(0), NumberOfPants(0),	  NumberOfOtherItems(0), PriceShirt(0.95),	  PricePants(1.75){}CleaningOrder::CleaningOrder(int Shirts, int Pants, int Others)	: NumberOfShirts(Shirts), NumberOfPants(Pants),	  NumberOfOtherItems(Others), PriceShirt(0.95),	  PricePants(1.75){}CleaningOrder::~CleaningOrder(){}void CleaningOrder::setNumberOfShirts(const int n){	NumberOfShirts = (n <= 0 ) ? 0 : n;}int  CleaningOrder::getNumberOfShirts() const{	return (NumberOfShirts <= 0 ? 0.00 : NumberOfShirts);}void CleaningOrder::setNumberOfPants(const int n){	NumberOfPants = (n <= 0) ? 0 : n;}int  CleaningOrder::getNumberOfPants() const{	return (NumberOfPants <= 0 ? 0.00 : NumberOfPants);}void CleaningOrder::setNumberOfOtherItems(const int n){	NumberOfOtherItems = (n <= 0 ? 0 : n); }int  CleaningOrder::getNumberOfOtherItems() const{	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;}void CleaningOrder::ProcessOrder(){	cout << "\nOrder Processing";	cout << "\nPlease provide the order date\n";	cout << "Enter Month: "; cin >> OrderDate.Month;	cout << "Enter Day:   "; cin >> OrderDate.Day;	cout << "Enter Year:  "; cin >> OrderDate.Year;	cout << "\nHow many shirts? ";	cin >> NumberOfShirts;	cout << "How many Pants? ";	cin >> NumberOfPants;	cout << "How many other items? ";	cin >> NumberOfOtherItems;	CalcPriceOtherItems(NumberOfOtherItems);	PriceShirt = 0.95;	PricePants = 1.75;}void CleaningOrder::DisplayReceipt() const{	cout << setiosflags(ios::fixed) << setprecision(2);	cout << "\n\nCleaning Receipt";	cout << "\nOrder Date: "		 << OrderDate.Month << "/" << OrderDate.Day		 << "/" << OrderDate.Year;	cout << "\n======================================="		 << "\nGeorgetown Cleaning Services - Receipt"         << "\n---------------------------------------"		 << "\nQty\tItem\tUnit\tSub-Total"		 << "\n" << getNumberOfShirts() << "\tShirts\t$"		 << getPriceShirt() << "\t$" << CalcPriceShirts()		 << "\n" << getNumberOfPants() << "\tPants\t$"		 << getPricePants() << "\t$" << CalcPricePants()		 << "\n" << getNumberOfOtherItems() << "\tOthers\t"		 << "Vary\t$" << TotalOtherItems		 << "\n---------------------------------------"		 << "\nTotal Order: $" << CalcTotalOrder()		 << "\n======================================";}

Header File: Date.h

#ifndef _DATE_H_#define _DATE_H_class Date{	friend class CleaningOrder;public:	int Month;	int Day;	int Year;};#endif	// _DATE_H_

Source File: Main.cpp

#include <iostream>#include <iomanip>#include "Date.h"using namespace std;#include "Orders.h"int main(){	CleaningOrder *Order = new CleaningOrder;	cout << "Welcome to Georgetown Cleaning Services\n";	Order->ProcessOrder();	Order->DisplayReceipt();	cout << "\n\n";	return 0;}