Project of C++ on Calculation of Thread consumption in T-Shirt

Synopsis of the project of COMPUTER PROGRAMMING(C++)

 TITLE

Software of Thread Consumption in Manufacturing a Garment.  Aims & Objectives

·       To calculate the thread consumed in manufacturing a garment.
·       To minimize the waste by having a perfect calculation.
·       This software will also help to control the waste.
·        Increase the efficiency of the garment.
·       To calculate the total cost of thread used.

Estimating Thread Consumption

While estimating thread consumption in a garment we will use following things.
1.   Length of garment (meters or yards)
2.   Make sequence of sewing operation.
3.   Number of Rows of Stitches

Here is source code. To get .cpp file inbox me ucet.mtn@gmail.com



#include<iostream.h>
#include<conio.h>
void star( )
{ for(int a=1;a<70;a++)
cout<<"*";}

void stitch( )
{ cout<<"1. Stitch 301 2. Stitch 401 3. Stitch 304 4. Stitch 503\n5. Stitch 504 6. Stitch 512 7. Stitch 516 8. Stitch 406\n9. Stitch 602 10. Stitch 605\n"; }
void plus( )
{ for(int c=1;c<70;c++) cout<<"="; }
void line( )
{ for(int b=1;b<70;b++)
cout<<"-"; }
struct variable { int a; float b,c,d,e,f,g,h,i,j; char ch; };
void main()
{
start:
clrscr();
star();
cout<<endl;
cout<<" SOFTWARE\n ";
cout<<" OF\n ";
cout<<" Thread Consumption Of Men`s T-Shirt\n";
star();
cout<<"\nSubmitted To : Sir Abdul Jabbar\nSubmitted By : Kamran & Group\n";
cout<<"Group Leader : Muhammad Kamran (10-TE-24)\n";
cout<<" Abdul Ahad (10-TE-44) Muhammad Sajid (10-TE-55)\n";
star();
cout<<endl;
variable x;
cout<<" WELCOME To Thread Consumption Software";
cout<<endl;
plus();
cout<<endl;
stitch();
line(); cout<<endl;
end:
do {
cout<<"Enter Stitch Classes Code for Join Shoulder :";
cin>>x.a;
switch(x.a)
{
case 1:
cout<<"Enter Seam length for Join Shoulder in inches :"; cin>>x.b;
cout<<"Enter rows of Seams :"; cin>>x.a;
x.c=x.b*x.a*5;
break;
case 2:
cout<<"Enter Seam length for Join Shoulder in inches :"; cin>>x.b;
cout<<"Enter rows of Seams :"; cin>>x.a;
x.c=(x.a*x.b*1.375)+(x.a*x.b*4.125);
break;
case 3:
cout<<"Enter Seam length for Join Shoulder in inches :"; cin>>x.b;
cout<<"Enter rows of Seams :"; cin>>x.a;
x.c=(x.a*x.b*3.5)+(x.a*x.b*3.5);
break;
case 4:
cout<<"Enter Seam length for Join Shoulder in inches :"; cin>>x.b;
cout<<"Enter rows of Seams :"; cin>>x.a;
x.c=(x.a*x.b*6.6)+(x.a*x.b*5.4);
break;
case 5:
cout<<"Enter Seam length for Join Shoulder in inches :"; cin>>x.b;
cout<<"Enter rows of Seams :"; cin>>x.a;
x.c=(x.a*x.b*2.8)+(x.a*x.b*11.2);
break;
case 6:
cout<<"Enter Seam length for Join Shoulder in inches :"; cin>>x.b;
cout<<"Enter rows of Seams :"; cin>>x.a;
x.c=(x.a*x.b*4.5*2)+(x.a*x.b*13.5);
break;
case 7:
cout<<"Enter Seam length for Join Shoulder in inches :"; cin>>x.b;
cout<<"Enter rows of Seams :"; cin>>x.a;
x.c=(x.a*x.b*4*2)+(x.a*x.b*16);
break;
case 8:
cout<<"Enter Seam length for Join Shoulder in inches :"; cin>>x.b;
cout<<"Enter rows of Seams :"; cin>>x.a;
x.c=(x.a*x.b*5.4*2)+(x.a*x.b*12.6);
break;
case 9:
cout<<"Enter Seam length for Join Shoulder in inches :"; cin>>x.b;
cout<<"Enter rows of Seams :"; cin>>x.a;
x.c=(x.a*x.b*5*2)+(x.a*x.b*20);
break;
case 10:
cout<<"Enter Seam length for Join Shoulder in inches :"; cin>>x.b;
cout<<"Enter rows of Seams :"; cin>>x.a;
x.c=(x.a*x.b*8.4*3)+(x.a*x.b*19.6);
break;
default:
cout<<"Wrong Selection Do You Want To Repeat (Y/N)? :"; cin>>x.ch;
}
}
while(x.ch=='y');
do {
cout<<"\nSelect Stitch Clase Code For Set Collarette :";
cin>>x.a;
switch(x.a)
{
case 1:
cout<<"Enter Seam Length for Collarette in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.d=x.b*x.a*5;
break;
case 2:
cout<<"Enter Seam Length for Collarette in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.d=(x.a*x.b*1.375)+(x.a*x.b*4.125);
break;
case 3:
cout<<"Enter Seam Length for Collarette in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.d=(x.a*x.b*3.5)+(x.a*x.b*3.5);
break;
case 4:
cout<<"Enter Seam Length for Collarette in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.d=(x.a*x.b*6.6)+(x.a*x.b*5.4);
break;
case 5:
cout<<"Enter Seam Length for Collarette in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.d=(x.a*x.b*2.8)+(x.a*x.b*11.2);
break;
case 6:
cout<<"Enter Seam Length for Collarette in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.d=(x.a*x.b*4.5*2)+(x.a*x.b*13.5);
break;
case 7:
cout<<"Enter Seam Length for Collarette in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.d=(x.a*x.b*4*2)+(x.a*x.b*16);
break;
case 8:
cout<<"Enter Seam Length for Collarette in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.d=(x.a*x.b*5.4*2)+(x.a*x.b*12.6);
break;
case 9:
cout<<"Enter Seam Length for Collarette in inches :"; cin>>x.b;
cout<<"Ente Rows of Seams :"; cin>>x.a;
x.d=(x.a*x.b*5*2)+(x.a*x.b*20);
break;
case 10:
cout<<"Enter Seam Length for Collarette in inche :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.d=(x.a*x.b*8.4*3)+(x.a*x.b*19.6);
break; default:
cout<<"Wrong Selection Do You Want To Repeat (y/N) :"; cin>>x.ch;
}
}
while(x.ch=='y');
do {
cout<<"\nEnter Stitch Clase Code for Tape Shoulder & Neck :";
cin>>x.a;
switch(x.a)
{
case 1:
cout<<"Enter Seam Length for Tap Shoulder Neck in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.e=x.b*x.a*5;
break; case 2:
cout<<"Enter Seam Length for Tap Shoulder Neck in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.e=(x.a*x.b*1.375)+(x.a*x.b*4.125);
break; case 3:
cout<<"Enter Seam Length for Tap Shoulder Ncck in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.e=(x.a*x.b*3.5)+(x.a*x.b*3.5);
break; case 4:
cout<<"Enter Seam Length for Tap Shoulder Ncck in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.e=(x.a*x.b*6.6)+(x.a*x.b*5.4);
break; case 5:
cout<<"Enter Seam Length for Tap Shoulder Ncck in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.e=(x.a*x.b*2.8)+(x.a*x.b*11.2);
break; case 6:
cout<<"Enter Seam Length for Tap Shoulder Ncck in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.e=(x.a*x.b*4.5*2)+(x.a*x.b*13.5);
break; case 7:
cout<<"Enter Seam Length for Tap Shoulder Neck in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.e=(x.a*x.b*4*2)+(x.a*x.b*16);
break; case 8:
cout<<"Enter Seam Length for Tap Shoulder Neck in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.e=(x.a*x.b*5.4*2)+(x.a*x.b*12.6);
break; case 9:
cout<<"Enter Seam Length for Tap Shoulder Neck in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.e=(x.a*x.b*5*2)+(x.a*x.b*20);
break; case 10:
cout<<"Enter Seam Length for Tap Shoulder Neck in inches :"; cin>>x.b;
cout<<"Enter Rows of Seam :"; cin>>x.a;
x.e=(x.a*x.b*8.4*3)+(x.a*x.b*19.6);
break;
default:
cout<<"Wrong Selection Do You Want To Repeat (Y/N) :"; cin>>x.ch;
}
}
while(x.ch=='y');
line(); cout<<endl;
stitch();
line();
cout<<endl;
do {
cout<<"\nEnter Stitch Clase Code for Hem Sleves :";
cin>>x.a;
switch(x.a)
{
case 1:
cout<<"Enter Seam Length for Hem Sleves in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.f=x.b*x.a*5;
break; case 2:
cout<<"Enter Seam Length for Hem Sleves in inches :"; cin>>x.b;
cout<<"Ente Rows of Seams :"; cin>>x.a;
x.f=(x.a*x.b*1.375)+(x.a*x.b*4.125);
break; case 3:
cout<<"Enter Seam Length for Hem Sleves in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.f=(x.a*x.b*3.5)+(x.a*x.b*3.5);
break; case 4:
cout<<"Enter Seam Length for Hem Sleves in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.f=(x.a*x.b*6.6)+(x.a*x.b*5.4);
break; case 5:
cout<<"Enter Seam Length for Hem Sleves in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.f=(x.a*x.b*2.8)+(x.a*x.b*11.2);
break; case 6:
cout<<"Enter Seam Length for Hem Sleves in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.f=(x.a*x.b*4.5*2)+(x.a*x.b*13.5);
break; case 7:
cout<<"Enter Seam Length for Hem Sleves in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.f=(x.a*x.b*4*2)+(x.a*x.b*16);
break; case 8:
cout<<"Enter Seam Length for Hem Sleves in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.f=(x.a*x.b*5.4*2)+(x.a*x.b*12.6);
break; case 9:
cout<<"Enter Seam Length for Hem Sleves in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.f=(x.a*x.b*5*2)+(x.a*x.b*20);
break; case 10:
cout<<"Enter Seam Length for Hem Sleves in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.f=(x.a*x.b*8.4*3)+(x.a*x.b*19.6);
break;
default:
cout<<"Wrong Selection Do You Want To Repeat (Y/N) :"; cin>>x.ch;
}
}
while(x.ch=='y');
do {
cout<<"\nEnter Stitch Clase Code for Close Sleves :";
cin>>x.a;
switch(x.a)
{
case 1:
cout<<"Enter Seam Length for Close Sleves in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.g=x.b*x.a*5;
break; case 2:
cout<<"Enter Seam Length for Close Sleves in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.g=(x.a*x.b*1.375)+(x.a*x.b*4.125);
break; case 3:
cout<<"Enter Seam Length for Close Sleves in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.g=(x.a*x.b*3.5)+(x.a*x.b*3.5);
break; case 4:
cout<<"Enter Seam Length for Close Sleves in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.g=(x.a*x.b*6.6)+(x.a*x.b*5.4);
break; case 5:
cout<<"Enter Seam Length for Close Sleves in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.g=(x.a*x.b*2.8)+(x.a*x.b*11.2);
break; case 6:
cout<<"Enter Seam Length for Close Sleves in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.g=(x.a*x.b*4.5*2)+(x.a*x.b*13.5);
break; case 7:
cout<<"Enter Seam Length for Close Sleves in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.g=(x.a*x.b*4*2)+(x.a*x.b*16);
break; case 8:
cout<<"Enter Seam Length for Close Sleves in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.g=(x.a*x.b*5.4*2)+(x.a*x.b*12.6);
break; case 9:
cout<<"Enter Seam Length for Close Sleves in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.g=(x.a*x.b*5*2)+(x.a*x.b*20);
break; case 10:
cout<<"Enter Seam Length for Close Sleves in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.g=(x.a*x.b*8.4*3)+(x.a*x.b*19.6);
break; default:
cout<<"Wrong Selection Do You Want To Repeat (Y/N) :"; cin>>x.ch;
}
}
while(x.ch=='y');
do {
cout<<"\nEnter Stitch Clase Code for Set Sleves :";
cin>>x.a;
switch(x.a)
{
case 1:
cout<<"Enter Seam Length for Set Sleves in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.h=x.b*x.a*5;
break; case 2:
cout<<"Enter Seam Length for Set Sleves in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.h=(x.a*x.b*1.375)+(x.a*x.b*4.125);
break; case 3:
cout<<"Enter Seam Length for set Sleves in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.h=(x.a*x.b*3.5)+(x.a*x.b*3.5);
break; case 4:
cout<<"Enter Seam Length for set Sleves in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.h=(x.a*x.b*6.6)+(x.a*x.b*5.4);
break; case 5:
cout<<"Enter Seam Length for set Sleves in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.h=(x.a*x.b*2.8)+(x.a*x.b*11.2);
break; case 6:
cout<<"Enter Seam Length for set Sleves in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.h=(x.a*x.b*4.5*2)+(x.a*x.b*13.5);
break; case 7:
cout<<"Enter Seam Length for set Sleves in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.h=(x.a*x.b*4*2)+(x.a*x.b*16);
break; case 8:
cout<<"Enter Seam Length for set Sleves in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.h=(x.a*x.b*5.4*2)+(x.a*x.b*12.6);
break; case 9:
cout<<"Enter Seam Length for set Sleves in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.h=(x.a*x.b*5*2)+(x.a*x.b*20);
break; case 10:
cout<<"Enter Seam Length for set Sleves in inches :"; cin>>x.b;
cout<<"Enter Rows of Seams :"; cin>>x.a;
x.h=(x.a*x.b*8.4*3)+(x.a*x.b*19.6);
break;
default:
cout<<"Wrong Selection Do You Want To Repeat (Y/N) :"; cin>>x.ch;
}
}
while(x.ch=='y');
do {
cout<<"\nEnter Selection and Data for Hem Bottom :";
cin>>x.a;
switch(x.a)
{
case 1:
cout<<"Enter Seam length for Hem Bottom in inches :"; cin>>x.b;
cout<<"Enter rows of Seams :"; cin>>x.a;
x.i=x.b*x.a*5;
break; case 2:
cout<<"Enter Seam length for Hem Bottom in inches :"; cin>>x.b;
cout<<"Enter rows of Seams :"; cin>>x.a;
x.i=(x.a*x.b*1.375)+(x.a*x.b*4.125);
break; case 3:
cout<<"Enter Seam length for Hem Bottom in inches :"; cin>>x.b;
cout<<"Enter rows of Seams :"; cin>>x.a;
x.i=(x.a*x.b*3.5)+(x.a*x.b*3.5);
break; case 4:
cout<<"Enter Seam length for Hem Bottom in inches :"; cin>>x.b;
cout<<"Enter rows of Seams :"; cin>>x.a;
x.i=(x.a*x.b*6.6)+(x.a*x.b*5.4);
break; case 5:
cout<<"Enter Seam length for Hem Bottom in inches :"; cin>>x.b;
cout<<"Enter rows of Seams :"; cin>>x.a;
x.i=(x.a*x.b*2.8)+(x.a*x.b*11.2);
break; case 6:
cout<<"Enter Seam length for Hem Bottom in inches :"; cin>>x.b;
cout<<"Enter rows of Seams :"; cin>>x.a;
x.i=(x.a*x.b*4.5*2)+(x.a*x.b*13.5);
break; case 7:
cout<<"Enter Seam length for Hem Bottom in inches :"; cin>>x.b;
cout<<"Enter rows of Seams :"; cin>>x.a;
x.i=(x.a*x.b*4*2)+(x.a*x.b*16);
break; case 8:
cout<<"Enter Seam length for Hem Bottom in inches :"; cin>>x.b;
cout<<"Enter rows of Seams :"; cin>>x.a;
x.i=(x.a*x.b*5.4*2)+(x.a*x.b*12.6);
break; case 9:
cout<<"Enter Seam length for Hem Bottom in inches :"; cin>>x.b;
cout<<"Enter rows of Seams :"; cin>>x.a;
x.i=(x.a*x.b*5*2)+(x.a*x.b*20);
break; case 10:
cout<<"Enter Seam length for Hem Bottom in inches :"; cin>>x.b;
cout<<"Enter rows of Seams :"; cin>>x.a;
x.i=(x.a*x.b*8.4*3)+(x.a*x.b*19.6);
break;
default:
cout<<"Wrong Selection Do You Want To Repeat (Y/N) :"; cin>>x.ch;
}
}
while(x.ch=='y');
plus();
x.j=(x.c+x.d+x.e+x.f+x.g+x.h+x.i)*0.027;
cout<<"\nThread consumed is :"<<x.j<<" yards"<<endl;
cout<<"Waste Percentage : 10 %"<<endl;
cout<<"Waste thread :"<<x.j*0.1<<" yards"<<endl;
x.c=x.j+(x.j*0.1);
cout<<"Total thread including Wastage is :"<<x.c<<" yards"<<endl;
line();
cout<<endl<<"Enter Price of Thread Per Yard in $ :"; cin>>x.b;
cout<<"Total Price Of Thread Consumed In $ Is :"<<x.c*x.b<<endl;
plus();
cout<<endl;
cout<<"Press R to repeat and E to exit :"; cin>>x.ch;
if(x.ch=='e')
{ goto start; }
else if(x.ch=='r')
{ clrscr(); goto end; }
cout<<endl;
}


No comments: