برنامه مدیریت کتابخانه در سی پلاس

قیمت :   ۱۰۵۰۰  تومان ( ده هزار و پانصد تومان)

رشته :

کامپیوتر

نوع فایل:

CPP , EXE

توضیحات:


توضیحات : 

سورس کد پیاده سازی برنامه مدیریت کتابخانه و ذخیره در فایل

توجه کنید که این پروژه همانطور که در سورس کد نمونه زیر نیز خواهید دید توسط Sturcture و Class ، استراکچر و کلاسها در سی پلاس پیاده سازی شده است .

در این برنامه شما می توانید - ویرایش اطلاعات کتب- حذف

اطلاعات – و … را انجام دهید .

همراه با فایلهای
EXE , CPP


لینک دانلود نمونه پروژه

================================

مشاهده بخشهایی از سورس کد این پروژه :

struct dt
{
int dd,mm,yy;
};
date d;

class menu
{
public:
void main_menu();
void books();
void employees();
void members();
void transaction();
};

class issue_return
{
int m_code,b_code;
dt id;
char status;
public:
int return_bcode()
{
return(b_code);
}
int return_mcode()
{
return(m_code);
}
void issue_book();
void return_book();
void list_book();
};

class employee
{
char name[25],address[25];
int code,age;
public:
void add_employee();
void delete_employee();
void search_employee();
void update_employee();
void list_employee();
int return_code2();
};

class member
{
char name[25],address[30];
int code,age;
public:
void add_member();
void delete_member();
void search_member();
void update_member();
void list_member();
int return_code1();
int ret_code()
{
return(code);
}
};

class book
{
int code,num_of_copies;
char title[20];
float price;
public:
void add_book();
void delete_book();
void search_book();
void update_book();
void list_book();
int return_code();
int ret_copies()
{
return(num_of_copies);
}
void increase_copies()
{
num_of_copies++;
}
void reduce_copies()
{
num_of_copies–;
}
int ret_bcode()
{
return code;
}
};

int employee::return_code2()
{
int c=0;
ifstream obj(“EMPLOYEE.DAT”);
if(!obj)
{
return 0;
}
while(!obj.eof())
{
obj.read((char*)this,sizeof(employee));
c=code;
}
obj.close();
return(c);
}

void employee::add_employee()
{
int d,m;
d=DETECT;
initgraph(&d,&m,”\\tc\\bgi”);
cleardevice();
setcolor(YELLOW);
rectangle(5,10,630,100);
setfillstyle(SOLID_FILL,YELLOW);
floodfill(15,15,YELLOW);
setcolor(RED);
settextstyle(7,0,5);
outtextxy(120,30,”ADD NEW EMPLOYEE”);
ofstream obj;
code=return_code2()+1;
obj.open(“EMPLOYEE.DAT”,ios::app);
if(!obj)
{
cout<<“File opening error”;
return;
}
gotoxy(30,10);
cout<<“Code of employee is:”<<code;
gotoxy(30,11);
cout<<“Enter employee name:”;
gets(name);
gotoxy(30,12);
cout<<“Enter age of employee:”;
cin>>age;
gotoxy(30,13);
cout<<“Enter address of employee:”;
gets(address);
obj.write((char*)this,sizeof(employee));
obj.close();
closegraph();
}

void employee::list_employee()
{
int d,m;
d=DETECT;
initgraph(&d,&m,”\\tc\\bgi”);
cleardevice();
setcolor(YELLOW);
rectangle(5,10,630,100);
setfillstyle(SOLID_FILL,YELLOW);
floodfill(15,15,YELLOW);
setcolor(RED);
settextstyle(7,0,5);
outtextxy(130,30,”LIST EMPLOYEE”);
int a=11;
ifstream obj;
obj.open(“EMPLOYEE.DAT”);
if(!obj)
{
cout<<“File opening error”;
return;
}
obj.seekg(0);
while(!obj.eof())
{
obj.read((char*)this,sizeof(employee));
if(obj.eof())
break;
gotoxy(2,10);
cout<<“Employee code”;
gotoxy(2,a);
cout<<code;
gotoxy(20,10);
cout<<“Employee name”;
gotoxy(20,a);
cout<<name;
gotoxy(40,10);
cout<<“Employee address”;
gotoxy(40,a);
cout<<address;
gotoxy(60,10);
cout<<“Employee age”;
gotoxy(60,a);
cout<<age;
a++;
}
obj.close();
getch();
closegraph();
}

void employee::search_employee()
{
int d,m;
d=DETECT;
initgraph(&d,&m,”\\tc\\bgi”);
cleardevice();
setcolor(YELLOW);
rectangle(5,10,630,100);
setfillstyle(SOLID_FILL,YELLOW);
floodfill(15,15,YELLOW);
setcolor(RED);
settextstyle(7,0,5);
outtextxy(120,30,”SEARCH EMPLOYEE”);
int code1,f=0;
gotoxy(22,7);
cout<<“\n Enter the code of the employee:”;
cin>>code1;
ifstream obj;
obj.open(“EMPLOYEE.DAT”);
if(!obj)
{
gotoxy(30,10);
cout<<“File opening error…..”;
return;
}
obj.seekg(0);
while(!obj.eof())
{
obj.read((char*)this,sizeof(employee));
if(code1==code)
{
f=1;
gotoxy(30,10);
cout<<“Employee code :”;
cout<<code;
gotoxy(30,11);
cout<<“Employee name :”;
cout<<name;
gotoxy(30,12);
cout<<“Employee age :”;
cout<<age;
gotoxy(30,13);
cout<<“Employee address :”;
cout<<address;
getch();
break;
}
}
if(f==0)
{
gotoxy(30,11);
cout<<“No employee exists with code “<<code1;
getch();
}
obj.close();
closegraph();
}

void employee::delete_employee()
{
int d,m;
d=DETECT;
initgraph(&d,&m,””);
cleardevice();
setcolor(YELLOW);
rectangle(5,10,630,100);
setfillstyle(SOLID_FILL,YELLOW);
floodfill(15,15,YELLOW);
setcolor(RED);
settextstyle(7,0,5);
outtextxy(130,30,”DELETE EMPLOYEE”);
int code2,f=0;
ifstream obj(“EMPLOYEE.DAT”);
ofstream obj1(“TEMP.DAT”);
if(!obj)
{
cout<<“File opening error”;
return;
}
if(!obj1)
{
cout<<“File opening error”;
return;
}
gotoxy(30,10);
cout<<“Enter the code of employee:”;
cin>>code2;
obj.seekg(0);
while(!obj.eof())
{
obj.read((char*)this,sizeof(employee));
if (obj.eof())
break;
if(code2!=code)
obj1.write((char*)this,sizeof(employee));
else
{
f=1;
gotoxy(30,11);
cout<<“Employee deleted”;
continue;
}
}
if(f==0)
{
gotoxy(30,11);
cout<<“Employee code not found….”;
getch();
}
obj.close();
obj1.close();
remove(“EMPLOYEE.DAT”);
rename(“TEMP.DAT”,”EMPLOYEE.DAT”);
closegraph();
}

void employee::update_employee()
{
int d,m;
d=DETECT;
initgraph(&d,&m,”\\tc\\bgi”);
cleardevice();
setcolor(YELLOW);
rectangle(5,10,630,100);
setfillstyle(SOLID_FILL,YELLOW);
floodfill(15,15,YELLOW);
setcolor(RED);
settextstyle(7,0,5);
outtextxy(130,30,”MODIFY EMPLOYEE”);
int f=0;
ifstream obj(“EMPLOYEE.DAT”);
ofstream obj1(“TEMP.DAT”);
if(!obj)
{
cout<<“File opening error”;
return;
}
if(!obj1)
{
cout<<“File opening error”;
return;
}
int code2;
gotoxy(30,10);
cout<<“Enter the code of employee:”;
cin>>code2;
obj.seekg(0);
while(!obj.eof())
{
obj.read((char*)this,sizeof(employee));
if(obj.eof())
break;

if(code2==code)
{
f=1;
gotoxy(30,10);
cout<<“Enter the new name of employee:”;
gets(name);
gotoxy(30,11);
cout<<“Enter code:”;
cin>>code;
gotoxy(30,12);
cout<<” Enter new age:”;
cin>>age;
gotoxy(30,13);
cout<<“Enter address:”;
gets(address);
obj1.write((char*)this,sizeof(employee));
}
else
obj1.write((char*)this,sizeof(employee));
}

if(f==0)
{
gotoxy(30,11);
cout<<“Employee code not found….”;
getch();
}

obj.close();
obj1.close();
remove(“EMPLOYEE.DAT”);
rename(“TEMP.DAT”,”EMPLOYEE.DAT”);
closegraph();
}

int member::return_code1()
{
int c=0;
ifstream obj(“STUDENT.DAT”);
if(!obj)
{
return 0;
}
while(!obj.eof())
{
obj.read((char*)this,sizeof(member));
c=code;
}
obj.close();
return(c);
}

void member::add_member()
{
int d,m;
d=DETECT;
initgraph(&d,&m,”\\tc\\bgi”);
cleardevice();
setcolor(YELLOW);
rectangle(5,10,630,100);
setfillstyle(SOLID_FILL,YELLOW);
floodfill(15,15,YELLOW);
setcolor(RED);
settextstyle(7,0,5);
outtextxy(130,30,”ADD NEW MEMBER”);
ofstream obj;
code=return_code1()+1;
obj.open(“STUDENT.DAT”,ios::app);
if(!obj)
{
cout<<“File opening error”;
return;
}
gotoxy(30,12);
cout<<” Code of member is:”<<code;
gotoxy(30,13);
cout<<” Enter member name:”;
gets(name);
gotoxy(30,14);
cout<<” Enter member age:”;
cin>>age;
gotoxy(30,15);
cout<<” Enter address of member:”;
gets(address);
obj.write((char*)this,sizeof(member));
obj.close();
closegraph();
}

void member::list_member()
{
int d,m;
d=DETECT;
initgraph(&d,&m,”\\tc\bgi”);
cleardevice();
setcolor(YELLOW);
rectangle(5,10,630,100);
setfillstyle(SOLID_FILL,YELLOW);
floodfill(15,15,YELLOW);
setcolor(RED);
settextstyle(7,0,5);
outtextxy(130,30,”LIST OF MEMBERS”);
int a=11;
ifstream obj;
obj.open(“STUDENT.DAT”);
if(!obj)
{
cout<<“File opening error”;
return;
}
obj.seekg(0);
while(!obj.eof())
{
obj.read((char*)this,sizeof(member));
if(obj.eof())
break;
gotoxy(2,10);
cout<<“Member code”;
gotoxy(2,a);
cout<<code;
gotoxy(20,10);
cout<<“Member name”;
gotoxy(20,a);
cout<<name;
gotoxy(40,10);
cout<<“Member address”;
gotoxy(40,a);
cout<<address;
gotoxy(60,10);
cout<<“Member age”;
gotoxy(60,a);
cout<<age;
a++;
}
obj.close();
getch();
closegraph();
}

void member::search_member()
{
int d,m;
d=DETECT;
initgraph(&d,&m,”\\tc\\bgi”);
cleardevice();
setcolor(YELLOW);
rectangle(5,10,630,100);
setfillstyle(SOLID_FILL,YELLOW);
floodfill(15,15,YELLOW);
setcolor(RED);
settextstyle(7,0,5);
outtextxy(160,30,”SEARCH MEMBER”);
int code1,f=0;
gotoxy(22,12);
cout<<“Enter the code of the member:”;
cin>>code1;
ifstream obj;
obj.open(“STUDENT.DAT”);
if(!obj)
{ gotoxy(30,10);
cout<<“File opening error…..”;
return;
}
obj.seekg(0);
while(!obj.eof())
{
obj.read((char*)this,sizeof(member));
if(code1==code)
{
f=1;
gotoxy(30,12);
cout<<“Member code :”;
cout<<code;
gotoxy(30,13);
cout<<“Member name :”;
cout<<name;
gotoxy(30,14);
cout<<“Member address :”;
cout<<address;
gotoxy(30,15);
cout<<“Member age :”;
cout<<age;
getch();
break;
}
}
if(f==0)
{
gotoxy(30,10);
cout<<“No member exists with code “<<code1;
getch();
}
obj.close();
closegraph();
}

دانلود کامل پروژه همراه با فایل سورس کد و فایل اجرایی آن
در تمامی ساعات شبانه روز >> پرداخت آنلاین و دانلود آنلاین پروژه


پذیرش و انجام سفارشات پروژه های شما
شماره تماس پشتیبانی سایت : ۰۹۳۹۲۷۶۱۶۳۰

 

Related posts

پاسخ دهید

نشانی ایمیل شما منتشر نخواهد شد. بخش‌های موردنیاز علامت‌گذاری شده‌اند *

Translate »