#include #include #include \"shirtType.h\" using namespace std; void getInput(shirtType s[],ifstream& infile, int& numShirts); int main() { int numShirts; shirtType shirts[500]; ifstream infile; infile.open(\"h:\\\\shirtlab.txt\"); getInput(shirts,infile,numShirts); for(int i =0; i>id; infile.ignore(100,\'\ \'); getline(infile,c); infile>>size>>p>>q; while(infile) { s[index].setAll(id, c, size, p, q); index++; infile>>id; infile.ignore(100,\'\ \'); getline(infile,c); infile>>size>>p>>q; } numShirts=index; } See also the description of the class shirtType below: #include #include using namespace std; class shirtType { private: int shirtID; string color; string size; double price; int quantity; public: void setAll(int i,string c,string s, double p, int q); void print() const; void newQuan(); shirtType(); shirtType(int,string,string,double,int); }; shirtType::shirtType(int i,string c,string s, double p, int q) { color = c; size = s; if(i>0) shirtID=i; else shirtID=0; if(p>0.0) price = p; else price=0.0; if (q>=0) quantity=q; else quantity = 0; } shirtType::shirtType() { shirtID=0; color=\"\"; size=\"\"; price=0.0; quantity=0; } void shirtType::setAll(int i,string c,string s, double p, int q) { color = c; size = s; if(i>0) shirtID=i; else shirtID=0; if(p>0.0) price = p; else price=0.0; if (q>=0) quantity=q; else quantity = 0; } void shirtType::newQuan() { cout<<\"Enter the new quantity of shirts: \"<>quantity; } void shirtType::print() const { cout<<\"Shirt ID: \"< Solution //shirtType.h #include #include using namespace std; class shirtType { private: int shirtID; string color; string size; double price; int quantity; public: void setAll(int i,string c,string s, double p, int q); void print() const; void newQuan(); int changeQuan(); int getShirtId(int); shirtType(); int search(int); shirtType(int,string,string,double,int); }; int shirtType::search(int sellId) { if(shirtID == sellId) return 1; else return 0; } int shirtType::getShirtId(int i) { return shirtID; } shirtType::shirtType(int i,string c,string s, double p, int q) { color = c; size = s; if(i>0) shirtID=i; else shirtID=0; if(p>0.0) price = p; else price=0.0; if (q>=0) quantity=q; else quantity = 0; } shirtType::shirtType() { shirtID=0; color=\"\"; size=\"\"; price=0.0; quantity=0; } void shirtType::setAll(int i,string c,string s, double p, int q) { color = c; size = s; if(i>0) shirtID=i; else shirtID=0; if(p>0.0) price = p; else price=0.0; if (q>=0) quantity=q; else quantity = 0; } void shirtType::newQuan() { int q; cout<<\"Enter the new quantity of shirts: \"<>q; quantity += q; } int shirtType::changeQuan() { if(quantity > 0 ) { quantity -= 1; return 1; } { return 2; } } void shirtType::print() const { cout<<\"Shirt ID: \"< #include #include #include \"shirtType.h\" #include using namespace std; void getInput(shirtType s[],ifstream& infile, int& numShirts); void addShirt(shirtType s[], int& numShirts); void sellShirt(shirtType s[], int& numShirts); void addstockShirt(shirtType s[], int&.