Pharmacy Mangement System
Pharmacy Mangement System
Pharmacy Mangement System
TASK
SUBMITTED TO: SIR AUN IRTAZA
SUBMITTED BY:
ALEEZA ANJUM(20-CS-101)
SOMIA SAEED(20-CS-03)
SYEDA KHADIJA NADEEM(20-CS-53)
#include <iostream>
#include <stdlib.h>
#include <string>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <fstream>
#include <iomanip>
#define max 10
public:
medicineType();//constuctor
};
medicineType::medicineType ()
int reciept_number;
string customerName;
string date;
int quantity[10];
int x, menu2[10];
double amount[10];
double total;
node *prev;
node *next;
node *link;
medicineType medicine;
int menu;
do
{
system("cls");
cout<<"\t\t\t\t==================================================\n\n";
cout<<"\t\t\t\t--------------------------------------------------\n";
cout<<"\t\t\t\t--------------------------------------------------\n";
cin>>menu;
switch (menu)
case 1:
break;
} //end case 1
case 2:
system("PAUSE");
break;
} //end case 2
case 3:
system("PAUSE");
break;
} //end case 3
case 4:
system("PAUSE");
break;
} //end case 4
case 5:
system("PAUSE");
break;
} //end case 5
case 6:
goto a;
break;
} //end case 6
default:
break;
}//end defeault
}//end Switch
}while(menu!=6);//end do
a://goto
cout<<"\t\t\t*************"<<endl;
cout<<"\t\t\t||thank you||"<<endl;
cout<<"\t\t\t*************"<<endl;
system ("PAUSE");
return 0;
system("cls");
int i;
node *temp;
temp=new node;
cout <<"\n\n\t\t\
t**************************************************************************\n";
cout <<"\t\t\
t**************************************************************************\n";
cout<<"\t\t\t "<<endl;
cin>> temp->customerName;
cin>>temp->date;
cout << "\t\t\tHow many Medicine would you like to order:"<< endl;
if (temp->x >10)
cout << "\t\t\tThe Medicine you order is exceed the maximum amount of order !";
system("pause");
else{
cin>> temp->menu2[i];
system("cls");
cout << "\t\t\t\t||The amount You need to pay is:"<< temp->amount[i]<<" RM||"<<endl;
system("PAUSE");
cout<<"\n\n\n\n\n\t\t\
t==========================================================================="<<endl;
cout<<"\t\t\t==========================================================================="<<endl;
cout<<"\t\t\t==========================================================================="<<endl;
system ("PAUSE");
temp->next=NULL;
if(start_ptr!=NULL)
temp->next=start_ptr;
start_ptr=temp;
system("cls");
{
int i, num, num2;
system("cls");
node *temp;
temp=start_ptr;
found = false;
cin>>num2;
cout<<"\n";
cout<<"\t\t\t\t==========================================================================="<<endl;
cout<<"\t\t\t\t==========================================================================="<<endl;
if (temp->reciept_number==num2)
found = true;
else
{
cout <<"\t\t\t\t\t\tReciept Number : "<<temp->reciept_number;
cout <<"\n";
cout<<"\t\t\
t_______________________________________________________________________________"<<endl;
cout << "\t\t\t| Medicine Type | Medicine Name | Quantity | Total Price |" << endl;
for (i=0;i<temp->x;i++)
cout<<"\t "<<temp->medicineName[temp->menu2[i]-1];
cout<<" \t "<<temp->quantity[i];
cout<<"\t\t\
t_______________________________________________________________________________"<<endl;
temp->total = temp->amount[0]+temp->amount[1]+temp->amount[2]+temp->amount[3]+temp-
>amount[4]+temp->amount[5]+temp->amount[6]+temp->amount[7]
+temp->amount[8]+temp->amount[9];
cout<<"\n";
cout << "\n\t\t\t\t\t\tType the exact amount You need to pay: ";
cout <<"\n";
cout <<"\n";
cout<<"\t\t\t\t\t\tPayment Done\n\t\t\t\t\t\tThank You\n";
cout <<"\
n_______________________________________________________________________________\n";
system("cls");
cin>>num;
node *q;
node *temp;
bool found;
if(start_ptr == NULL)
else
if(start_ptr->reciept_number == num)
q = start_ptr;
start_ptr = start_ptr->next;
count--;
if(start_ptr == NULL)
last = NULL;
delete q;
else
found = false;
temp = start_ptr;
q = start_ptr->next;
if(q->reciept_number != num)
temp = q;
q = q-> next;
else
found = true;
if(found)
temp->next = q->next;
count--;
if(last == q)
last = temp;
delete q;
else
}
} //End function delete_order
system("cls");
bool found;
found = false;
temp = start_ptr;
cin>>sid;
else
if (temp->reciept_number==sid)
found = true;
else
if (found)
cin>> temp->customerName;
cin>>temp->date;
cout << "\t\t\t\t\t\tHow many New Medicine would you like to Change:"<< endl;
if (temp->x >10)
cout << "\t\t\t\t\t\tThe Medicine you order is exceed the maximum amount of order !";
system("pause");
else{
cin>> temp->menu2[i];
cout << "\t\t\t\t\t\tThe amount You need to pay After Modify is: " << temp->amount[i]<<" RM"<<endl;
system("PAUSE");
temp = temp->next;
system("cls");
}
cout<<"\t\t\t\t\t\tRECORD MODIFIED....!"<<endl;
else
int i,num;
system("cls");
node *temp ;
temp=start_ptr;
else
cout<<"\n\n";
cout<<"\t\
t==========================================================================="<<endl;
cout <<"\t\t\ Here is the Daily Summary of All Orders \n"; //print all receipt
cout<<"\t\
t==========================================================================="<<endl;
while(temp!=NULL)
cout <<"\n";
cout<<"\t\
t_________________________________________________________________"<<endl;
cout << "\t\t|Medicine Type |Medicine Name |Quantity |Total Price |" << endl;
for (i=0;i<temp->x;i++)
cout <<"\t\t"<<temp->type;
cout<<"\t\t"<<temp->medicineName[temp->menu2[i]-1];
cout<<"\t"<<temp->quantity[i];
cout<<"\t\t"<<temp->amount[i]<<" RM"<<endl;
cout<<"\t\
t_________________________________________________________________"<<endl;
temp->total = temp->amount[0]+temp->amount[1]+temp->amount[2]+temp->amount[3]+temp-
>amount[4]+temp->amount[5]+temp->amount[6]+temp->amount[7]
+temp->amount[8]+temp->amount[9];
cout<<"\n\t\tTotal Bill is : "<<temp->total<<"Rs";
cout <<"\n";
cout <<"\n";
cout <<"\
n_______________________________________________________________________________________________________
_______________\n";
temp=temp->next;
OUTPUT:
**************************************** THE END***********************************************