سورس سیستم مدیریت بانک به زبان C++
در این بخش سورس سیستم مدیریت بانک به زبان C++ را برای شما آماده کرده ایم که در محیط نرم افزار Code::Blocks و زبان برنامه نویسی سی پلاس پلاس نوشته شده است. در ادامه می توانید توضیحات، تصاویر و همچنین فیلمی از نحوه اجرا شدن پروژه را مشاهده کنید.
توضیحات پروژه
در این پروژه بعد از اجرا شدن برنامه یک منو شامل گزینه های زیر به کاربر نمایش داده می شود تا با استفاده از آن ها حساب های موجود را مدیریت کند.
- ADD ACCOUNT
- DEPOSIT AMOUNT
- WITHDRAW AMOUNT
- BALANCE ENQUIRY
- ALL ACCOUNT HOLDER LIST
- CLOSE AN ACCOUNT
- MODIFY AN ACCOUNT
- EXIT
در لیست فوق، گزینه اول برای ایجاد حساب جدید استفاده می شود. گزینه دوم برای واریز وجه به یک حسابی که قبلا ایجاد شده استفاده می شود. گزینه دوم برای برداشت از حسابی که قبلا ایجاد شده استفاده می شود. گزینه سوم برای مشاهده وضعیت حساب استفاده می شود. گزینه پنجم همه حساب های موجود را نمایش می دهد. گزینه ششم حساب ایجاد شده را حذف می کند. گزینه هفتم برای ویرایش حساب ایجاد شده استفاده می شود. گزینه آخر هم برای خروج از برنامه استفاده می شود.
شما با مشاهده سورس کد این پروژه می توانید چگونگی کار با فایل، کلاس، نحوه نوشتن، خواندن، جستجو و حذف کردن داده ها در/از فایل را یاد گرفته و مهارت برنامه نویسی خودتان را ارتقا دهید.
قسمت های از سورس کد
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | #include<iostream> #include<fstream> #include<ctype.h> #include<iomanip> #include<conio.h> #include<stdio.h> using namespace std; class account { int acno; char name[50]; int deposit; char type; public: void create_account(); //function to get data from user void show_account(); //function to show data on screen void modify(); //function to get new data from user void dep(int); //function to accept amount and add to balance amount void draw(int); //function to accept amount and subtract from balance amount void report(); //function to show data in tabular format int retacno(); //function to return account number int retdeposit(); //function to return balance amount char rettype(); //function to return type of account }; //class ends here void account::create_account() { cout<<"nEnter The account No."; cin>>acno; cout<<"nnEnter The Name of The account Holder : "; cin.ignore(); gets(name); cout<<"nEnter Type of The account (C/S) : "; cin>>type; type=toupper(type); cout<<"nEnter The Initial amount(>=500 for Saving and >=1000 for current ) : "; cin>>deposit; cout<<"nnnAccount Created.."; } void account::show_account() { cout<<"nAccount No. : "<<acno; cout<<"nAccount Holder Name : "; cout<<name; cout<<"nType of Account : "<<type; cout<<"nBalance amount : "<<deposit; } void account::modify() { cout<<"nThe account No."<<acno; cout<<"nnEnter The Name of The account Holder : "; cin.ignore(); gets(name); cout<<"nEnter Type of The account (C/S) : "; cin>>type; type=toupper(type); cout<<"nEnter The amount : "; cin>>deposit; } void account::dep(int x) { deposit+=x; } void account::draw(int x) { deposit-=x; } void account::report() { cout<<acno<<setw(10)<<" "<<name<<setw(10)<<" "<<type<<setw(6)<<deposit<<endl; } int account::retacno() { return acno; } int account::retdeposit() { return deposit; } char account::rettype() { return type; } void write_account(); //function to write record in binary file void display_sp(int); //function to display account details given by user void modify_account(int); //function to modify record of file void delete_account(int); //function to delete record of file void display_all(); //function to display all account details void deposit_withdraw(int, int); // function to desposit/withdraw amount for given account void intro(); //introductory screen function int main() { char ch; int num; //clrscr(); intro(); do { cout<<endl; cout<<"nnntMAIN MENU"; cout<<"nnt01. NEW ACCOUNT"; cout<<"nnt02. DEPOSIT AMOUNT"; cout<<"nnt03. WITHDRAW AMOUNT"; cout<<"nnt04. BALANCE ENQUIRY"; cout<<"nnt05. ALL ACCOUNT HOLDER LIST"; cout<<"nnt06. CLOSE AN ACCOUNT"; cout<<"nnt07. MODIFY AN ACCOUNT"; cout<<"nnt08. EXIT"; cout<<"nntSelect Your Option (1-8) "; cin>>ch; cout<<endl; switch(ch) { case '1': write_account(); break; case '2': cout<<"nntEnter The account No. : "; cin>>num; deposit_withdraw(num, 1); break; case '3': cout<<"nntEnter The account No. : "; cin>>num; deposit_withdraw(num, 2); break; case '4': cout<<"nntEnter The account No. : "; cin>>num; display_sp(num); break; case '5': display_all(); break; case '6': cout<<"nntEnter The account No. : "; cin>>num; delete_account(num); break; case '7': cout<<"nntEnter The account No. : "; cin>>num; modify_account(num); break; case '8': cout<<"nntThanks for using bank management system"; break; default :cout<<"a"; } getch(); }while(ch!='8'); return 0; } |
هیچ نظری ثبت نشده است