//File : driverInventory.cpp //Author : Andre Long //Due : September 29, 2004 //Description: This is the main program which will demonstright // the inventory class for program challenge 2 chapter 13 #include #include #include "inventory.h" using namespace std; int main() { int item_number; int qty; float item_cost; inventory apples; inventory oranges; inventory pears; inventory peaches; inventory grapes; cout<<"Beginning stats (empty store)"<<"\n"; cout<<"Item No "<<"Qty "<<"Cost "<<"Total Cost "<<"\n"; cout<>item_number; apples.setItemNumber(item_number); cout<<"\n"; cout<<"Enter how many apples "; cin>>qty; apples.setQuantity(qty); cout<<"\n"; cout<<"Enter cost of one apple "; cin>>item_cost; apples.setCost(item_cost); apples.setTotalCost(); cout<<"\n"; cout<<"Enter item number for oranges "; cin>>item_number; oranges.setItemNumber(item_number); cout<<"\n"; cout<<"Enter how many oranges "; cin>>qty; oranges.setQuantity(qty); cout<<"\n"; cout<<"Enter cost of one orange "; cin>>item_cost; oranges.setCost(item_cost); oranges.setTotalCost(); cout<<"\n"; cout<<"Enter item number for pears "; cin>>item_number; pears.setItemNumber(item_number); cout<<"\n"; cout<<"Enter how many pears "; cin>>qty; pears.setQuantity(qty); cout<<"\n"; cout<<"Enter cost of one pear "; cin>>item_cost; pears.setCost(item_cost); pears.setTotalCost(); cout<<"\n"; cout<<"Enter item number for peaches "; cin>>item_number; peaches.setItemNumber(item_number); cout<<"\n"; cout<<"Enter how many peaches "; cin>>qty; peaches.setQuantity(qty); cout<<"\n"; cout<<"Enter cost of one peach "; cin>>item_cost; peaches.setCost(item_cost); peaches.setTotalCost(); cout<<"\n"; cout<<"Enter item number for grapes "; cin>>item_number; grapes.setItemNumber(item_number); cout<<"\n"; cout<<"Enter how many vines of grapes "; cin>>qty; grapes.setQuantity(qty); cout<<"\n"; cout<<"Enter cost of one vine of grapes "; cin>>item_cost; grapes.setCost(item_cost); grapes.setTotalCost(); cout<<"\n"; cout<<"Store with full inventory"<<"\n"; cout<<"\n"; cout<<"Beginning stats (empty store)"<<"\n"; cout<<"Item No "<<"Qty "<<"Cost "<<"Total Cost "<<"\n"; cout<