در این برنامه که با زبان سی پلاس پلاس پیاده سازی شده است ، یک منو تعریف شده که کاربر با انتخاب هر گزینه عملیاتی مانند ثبت اطلاعات کالاها – ویرایش اطلاعات کالاهای فروشگاه – حذف یک محصول و همچنین گزارشگیری را داریم. در این پروژه از تابع جهت دسترسی به بخشهای مختلف استفاده شده است و همچنین اطلاعات در قالب فایل ذخیره سازی می شوند.
در ادامه تصویری از فایل اجرایی این پروژه را مشاهده می کنید :
======
بخشهایی از سورس کد سی پلاس این برنامه :
#include<iostream.h>
#include<fstream.h>
#include<stdlib.h>
#include<conio.h>
#include<stdio.h>
#include<cstring.h>
#include<math.h>
void enter();
void report();
void edit();
void del();
int menu();
struct store
{
char s_name[21];//stamp name
char p_name[21];//procedure name
long int code; //code stamp
float cost;//cost stamp
float supply;//Monthly supply stamp in last
year
float sale; //Monthly sale stamp
} st;
//**************
int main(){
int c;
for(;;){
clrscr();
c=menu();
switch(c){
case 1: enter();break;
case 2: edit();break;
case 3: del();break;
case 4: report();break;
case 5: exit(0);
}
}
}
//*************
int menu()
{
int p;
cout<<“1:Enter data.\n”;
cout<<“2:Edit the record.\n”;
cout<<“3:Delete the record.\n”;
cout<<“4:Report the file.\n”;
cout<<“5:Terminate program.\n”;
cout<<“Enter your select(1-5):\n”;
cin>>p;
cin.get();
return p;
}
//*************
*
void enter()
{
int r=2;
int n;
clrscr();
cout<<“Enter Nember Of Stamp:”;
cin>>n;
cout<<“\n”;
clrscr();
ofstream out(“store2.txt”);
if(!out){
cout<<“cannot open file.”;
getch();
exit(0);
}
gotoxy(1,1);
cout<<“StampName”;
gotoxy(20,1);
cout<<“ProcedureName”;
gotoxy(35,1);
cout<<“code”;
gotoxy(45,1);
cout<<“cost”;
gotoxy(55,1);
cout<<“Supply”;
gotoxy(65,1);
cout<<“sale\n”;
*دوست عزیز در صورت نداشتن رمز پویا یا قطع بودن درگاه بانکی ، لطفا
نام پروژه درخواستی خود را
جهت هماهنگی برای دریافت شماره کارت واریزی و دریافت لینک دانلود،
به واتساپ پشتیبانی سایت ۰۹۳۹۲۷۶۱۶۳۰ ارسال کنید
*(از ساعت
۸ الی ۲۳)