






































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
It is an object oriented base programming based inventory system, but for now it contains some of the functions only which are required in an inventory management system, many of the changes are still required which will be done after passage of time.
Typology: Study notes
1 / 46
This page cannot be seen from the preview
Don't miss anything!







































Ali Hasnain (22021519-130)
Sir Usman
Object Oriented Programming
#include
cout << dot; } cout << "\r"; for(size_t i = 1; i <= 30;i++) { cout << solid; Sleep(50); } } void project_name() { cout << " -----------------------------------------------------------------------------" << endl; cout << " |~ ~|" << endl; cout << " |~ ~|" << endl; cout << " |~ ~|" << endl; cout << " |~ WELCOME TO Inventory Management System ~|" << endl; cout << " |~ ~|" << endl; cout << " |~ ~|" << endl; cout << " |~ ~|" << endl; cout << " ------------------------------------------------------------------------------" << endl;
cout << " " << endl; cout << " -------------------------------- " << endl; cout << " | press any key to run program | " << endl; cout << " -------------------------------- " << endl; } class warehouse { int warehouse_ID; string location; string capacity; int RegNo; public: warehouse () { int warehouse_ID=1; string location="1"; int lists_of_products=1; } int GetRegNo() { return RegNo;
else if(ae==2) { warehouse qw; qw.update_warehouse(); exit(1); //search process } else if(ae==3) { warehouse ee; ee.delete_warehouse(); exit(1); } else if(ae==4) { warehouse qq; qq.display_warehouse_info(); exit(1); } else if(ae==5) {
search_warehouse(); } else if(ae==6) { } else if(ae==7) { exit(1); } else { cout<<"DEFAULT VALUE "<<endl; cout<<"Enter Valid number "<<endl; getch; warehouse::warehouse_manu(); } } } void add_warehouse_info() {
void display_warehouse_info() { // } void delete_warehouse() { // } }; class warehousecollection :public warehouse { warehouse warehousearray[100]; int warehousecount=0; public: int FindCarByRegNo(int regNo) { int index = -1; for (int i = 0; i < warehousecount; i++) { if (warehousearray[i].GetRegNo() == regNo) {
index = i; break; } } return index; } void searchwarehouse() { int num = -1; cout << "Enter the Reg No. to be searched:"; cin >> num; int index = FindCarByRegNo(num); if (index >= 0) { cout << "Found"; warehousearray[index].display_warehouse_info(); } else cout << "Not Found"; }
string get_exp_date() { // } string get_issue_date() { // } static int manu11() { int bh; while(bh!=4) { system("cls"); cout<<"\t\t\t\tPress 1 to set expiry date of product "<<endl; cout<<"\t\t\t\tPress 2 to update expiry date "<<endl; cout<<"\t\t\t\tPress 3 to view expiry date of product "<<endl; cout<<"\t\t\t\tPress 4 to search expiry of a specific product "<<endl; cout<<"\t\t\t\tPress 5 to return to previous "<<endl; cout<<"\t\t\t\tPress 6 to exit "<<endl; cin>>bh;
if(bh==1) { warehouse::warehouse_manu(); cout<<"All data stored successfully "<<endl; exit(1); } else if(bh==4) { change_expiry g; g.search_expirydate(); ///kuch to grber ha } } } void search_expirydate() { // } }; class purchase_order : public Order, public date { public:
else { system("cls"); cout<<"Enter the Order ID: "; cin>>orderID; cout<<"Enter total Cost: "; cin>>totalcost; cout<<"Enter the Date "; cin>>expected_delivery_date; wf<<"Order ID:"<<orderID<<endl; wf<<"total Cost:"<<totalcost<<endl; wf<<"Date:"<<expected_delivery_date<<endl; wf.close(); i++; } } void set_orderInfo() { ifstream file; string temp; file.open("purchaseorder.txt"); if(!file) {
cout<<"Error"<<endl; } else { while(getline(file,temp)) { cout<<temp<<endl; } } file.close(); getch(); } void display_purchase_order() { } void delete_purchase_order() { } void update_purchase_order() { }
purchase_order::purchase_ordermanu(); // temporarily formed } else if(aty==3) { purchase_order aa; aa.update_purchase_order(); } else if(aty==4) { } else if(aty==5) { exit(1); } else { cout<<"Enter Valid Number "<<endl; getch; }
class saleorder : public Order , public date { string deliveryDate; public: saleorder() { totalcost = 0; // orderDate="1"; deliveryDate="1"; } saleorder(double tcost) { // code } saleorder(saleorder &obj) { // code } void Enter_customerInfo() {