hi..can i ask something this C++ i have a problem that i am not really sure if this is run to the program i am not expert of this C++ i want help of this,
this is what i mean to do for i make my program but i think i am not satisfy if i input the record # i want tool name, quantity, cost will be appear in my program this is my assignment can you help me
Hardware Store Inventory.
You are the owner of a hardware store and need to keep an inventory that can tell you what different tools you stock, how many of each you have on hand and the cost of each one. Write a program that interest the random-access file to 1000 empty records and lets you input the data concerning each tool, list all your tools, delete a record for a tool that you no longer have and update any information in the file. The tool identification number should be the record number.
cout<<"Good day! Your name is?"<<"\n";
cout<<"[please key-in your first name]"<<"\n";
cin>>name;
cout<<"\n";
cout<<"Hello,"<<" "<<name<<"!"<<" "<<"Shall we start the day with keying-in"<<"\n";
cout<<"our initial item count with the corresponding cost of each item?"<<"\n";
cout<<"Please enter the needed data correctly as follows:"<<"\n";
cout<<"\n";
cout<<"Enter the initial quantity/number of SANDERS:"<<"\n";
cin>>a;
cout<<" "<<"How much will each SANDER cost?"<<"\n";
cout<<" "<<"$";
cin>>a1;
cout<<" "<<"Is this final and correct? [Y/N]";
cin>>deca;
if(deca=='N'||deca=='n')
{
cout<<"Enter the initial quantity/number of SANDER/S:"<<"\n";
cin>>ia;
cout<<" "<<"How much will each SANDER cost?"<<"\n";
cout<<" "<<"$";
cin>>ia1;
}
else if(deca=='Y'||deca=='y')
ia=a;
ia1=a1;
cout<<"\n";
cout<<"Enter the initial quantity/number of HAMMER/S:"<<"\n";
cin>>b;
cout<<" "<<"How much will each HAMMER cost?"<<"\n";
cout<<" "<<"$";
cin>>b1;
cout<<" "<<"Is this final and correct? [Y/N]";
cin>>decb;
if(decb=='N'||decb=='n')
{
cout<<"Enter the initial quantity/number of HAMMER/S:"<<"\n";
cin>>ib;
cout<<" "<<"How much will each HAMMER cost?"<<"\n";
cout<<" "<<"$";
cin>>ib1;
}
else if(decb=='Y'||decb=='y')
ib=b;
ib1=b1;
cout<<"\n";
cout<<"Enter the initial quantity/number of JIGSAW/S:"<<"\n";
cin>>c;
cout<<" "<<"How much will each JIGSAW cost?"<<"\n";
cout<<" "<<"$";
cin>>c1;
cout<<" "<<"Is this final and correct? [Y/N]";
cin>>decc;
if(decc=='N'||decc=='n')
{
cout<<"Enter the initial quantity/number of JIGSAW/S:"<<"\n";
cin>>ic;
cout<<" "<<"How much will each JIGSAW cost?"<<"\n";
cout<<" "<<"$";
cin>>ic1;
}
else if(decc=='Y'||decc=='y')
ic=c;
ic1=c1;
cout<<"\n";
cout<<"Enter the initial quantity/number of MOWER/S:"<<"\n";
cin>>d;
cout<<" "<<"How much will each MOWER cost?"<<"\n";
cout<<" "<<"$";
cin>>d1;
cout<<" "<<"Is this final and correct? [Y/N]";
cin>>decd;
if(decd=='N'||decd=='n')
{
cout<<"Enter the initial quantity/number of MOWER/S:"<<"\n";
cin>>id;
cout<<" "<<"How much will each MOWER cost?"<<"\n";
cout<<" "<<"$";
cin>>id1;
}
else if(decd=='Y'||decd=='y')
id=d;
id1=d1;
cout<<"\n";
cout<<"Enter the initial quantity/number of SAW/S:"<<"\n";
cin>>e;
cout<<" "<<"How much will each SAW cost?"<<"\n";
cout<<" "<<"$";
cin>>e1;
cout<<" "<<"Is this final and correct? [Y/N]";
cin>>dece;
if(dece=='N'||dece=='n')
{
cout<<"Enter the initial quantity/number of SAW/S:"<<"\n";
cin>>ie;
cout<<" "<<"How much will each SAW cost?"<<"\n";
cout<<" "<<"$";
cin>>ie1;
}
else if(dece=='Y'||dece=='y')
ie=e;
ie1=e1;
cout<<"\n";
cout<<"Enter the initial quantity/number of SCREWDRIVER/S"<<"\n";
cin>>f;
cout<<" "<<"How much will each SCREWDRIVER cost?"<<"\n";
cout<<" "<<"$";
cin>>f1;
cout<<" "<<"Is this final and correct? [Y/N]";
cin>>decf;
if(decf=='N'||decf=='n')
{
cout<<"Enter the initial quantity/number of SCREWDRIVER/S:"<<"\n";
cin>>ia;
cout<<" "<<"How much will each SCREWDRIVER cost?"<<"\n";
cout<<" "<<"$";
cin>>ia1;
}
else if(decf=='Y'||decf=='y')
fi=f;
if1=f1;
cout<<"\n";
cout<<"Enter the initial quantity/number of SLEDGEHAMMER/S:"<<"\n";
cin>>g;
cout<<" "<<"How much will each SLEDGEHAMMER cost?"<<"\n";
cout<<" "<<"$";
cin>>g1;
cout<<" "<<"Is this final and correct? [Y/N]";
cin>>decg;
if(decg=='N'||decg=='n')
{
cout<<"Enter the initial quantity/number of SLEDGEHAMMER/S:"<<"\n";
cin>>ig;
cout<<" "<<"How much will each SLEDGEHAMMER cost?"<<"\n";
cout<<" "<<"$";
cin>>ig1;
}
else if(decg=='Y'||decg=='y')
ig=g;
ig1=g1;
cout<<"\n";
cout<<"Enter the initial quantity/number of WRENCH/ES:"<<"\n";
cin>>h;
cout<<" "<<"How much will each WRENCH cost?"<<"\n";
cout<<" "<<"$";
cin>>h1;
cout<<" "<<"Is this final and correct? [Y/N]";
cin>>dech;
if(dech=='N'||dech=='n')
{
cout<<"Enter the initial quantity/number of WRENCH/ES:"<<"\n";
cin>>ih;
cout<<" "<<"How much will each WRENCH cost?"<<"\n";
cout<<" "<<"$";
cin>>ih1;
}
else if(dech=='Y'||dech=='y')
ih=h;
ih1=h1;
cout<<"\n";
cout<<"Enter the initial quantity/number of MALLET/S:"<<"\n";
cin>>i;
cout<<" "<<"How much will each MALLET cost?"<<"\n";
cout<<" "<<"$";
cin>>i1;
cout<<" "<<"Is this final and correct? [Y/N]";
cin>>deci;
if(deci=='N'||deci=='n')
{
cout<<"Enter the initial quantity/number of MALLET/S:"<<"\n";
cin>>ii;
cout<<" "<<"How much will each MALLET cost?"<<"\n";
cout<<" "<<"$";
cin>>ii1;
}
else if(deci=='Y'||deci=='y')
ii=i;
ii1=i1;
cout<<"\n";
cout<<"Enter the initial quantity/number of SHOVEL/S:"<<"\n";
cin>>j;
cout<<" "<<"How much will each SHOVEL cost?"<<"\n";
cout<<" "<<"$";
cin>>j1;
cout<<" "<<"Is this final and correct? [Y/N]";
cin>>decj;
if(decj=='N'||decj=='n')
{
cout<<"Enter the initial quantity/number of SHOVEL/S:"<<"\n";
cin>>ij;
cout<<" "<<"How much will each SHOVEL cost?"<<"\n";
cout<<" "<<"$";
cin>>ij1;
}
else if(decj=='Y'||decj=='y')
ij=j;
ij1=j1;
cout<<"\n";
cout<<"\n";
cout<<"*******************SUMMARY INITIAL COUNTING*******************"<<"\n";
cout<<"\n";
cout<<"SANDER/S:"<<" "<<ia<<"piece/s sold at $"<<ia1<<"\n";
cout<<"\n";
cout<<"HAMMER/S:"<<" "<<ib<<"piece/s sold at $"<<ib1<<"\n";
cout<<"\n";
cout<<"JIGSAW/S:"<<" "<<ic<<"piece/s sold at $"<<ic1<<"\n";
cout<<"\n";
cout<<"MOWER/S:"<<" "<<id<<"piece/s sold at $"<<id1<<"\n";
cout<<"\n";
cout<<"SAW/S:"<<" "<<ie<<"piece/s sold at $"<<ie1<<"\n";
cout<<"\n";
cout<<"SCREWDRIVER/S:"<<" "<<fi<<"piece/s sold at $"<<if1<<"\n";
cout<<"\n";
cout<<"SLEDGEHAMMER/S:"<<""<<ig<<"piece/s sold at $"<<ig1<<"\n";
cout<<"\n";
cout<<"WRENCH/ES:"<<" "<<ih<<"piece/s sold at $"<<ih1<<"\n";
cout<<"\n";
cout<<"MALLET/S:"<<" "<<ii<<"piece/s sold at $"<<ii1<<"\n";
cout<<"\n";
cout<<"SHOVEL/S:"<<" "<<ij<<"piece/s sold at $"<<ij1<<"\n";
cout<<"\n";
cout<<"**************************************************************"<<"\n";