C++ PROGRAM This program builds on the code below: #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 #include #include struct node { int data; struct node *next; }*head; void append(int nkkm) { struct node *temp,*right; temp= (struct node *)malloc(sizeof(struct node)); temp->data=nkkm; right=(struct node *)head; while(right->next != NULL) right=right->next; right->next =temp; right=temp; right->next=NULL; } void add( int nkkm ) { struct node *temp; temp=(struct node *)malloc(sizeof(struct node)); temp->data=nkkm; if (head== NULL) { head=temp; head->next=NULL; } else { temp->next=head; head=temp; } } void addafter(int nkkm, int loc) { int i; struct node *temp,*left,*right; right=head; for(i=1;inext; } temp=(struct node *)malloc(sizeof(struct node)); temp->data=nkkm; left->next=temp; left=temp; left->next=right; return; } void addaShirt(int nkkm) { int c=0; struct node *temp; temp=head; if(temp==NULL) { add(nkkm); } else { while(temp!=NULL) { if(temp->datanext; } if(c==0) add(nkkm); else if(cdata==nkkm) { if(temp==head) { head=temp->next; free(temp); return 1; } else { prev->next=temp->next; free(temp); return 1; } } else { prev=temp; temp= temp->next; } } return 0; } void display(struct node *r) { r=head; if(r==NULL) { return; } while(r!=NULL) { printf(\"%d \",r->data); r=r->next; } printf(\"\ \"); } int count() { struct node *n; int c=0; n=head; while(n!=NULL) { n=n->next; c++; } return c; } int main() { int i,nkkm; struct node *n; head=NULL; while(1) { printf(\"1.Add a shirt\ \"); printf(\"2.Sell a shirt\ \"); printf(\"3.Res.