InLab 5
#include<string.h>
void item::get(){
cin>>prod_name>>prod_code>>prod_price>>stock_In_Hand;
}
void store::get_details(){
cin>>num_Of_Items;
for(int i=0;i<num_Of_Items;i++)
items[i].get();
}
void store_keeper::print(){
cout<<name<<"\n"<<id<<"\n";
}
void store_keeper::stock_mgmt(store &s){
for(int i=0;i<s.num_Of_Items;i++){
if(s.items[i].stock_In_Hand<10){
strcpy(name,s.items[i].prod_name);
strcpy(id,s.items[i].prod_code);
print();
}
}
}
void item::get(){
cin>>prod_name>>prod_code>>prod_price>>stock_In_Hand;
}
void store::get_details(){
cin>>num_Of_Items;
for(int i=0;i<num_Of_Items;i++)
items[i].get();
}
void store_keeper::print(){
cout<<name<<"\n"<<id<<"\n";
}
void store_keeper::stock_mgmt(store &s){
for(int i=0;i<s.num_Of_Items;i++){
if(s.items[i].stock_In_Hand<10){
strcpy(name,s.items[i].prod_name);
strcpy(id,s.items[i].prod_code);
print();
}
}
}
No comments:
Post a Comment