| | |
help me develop banking system
![]() |
•
•
Join Date: Aug 2004
Posts: 6
Reputation:
Solved Threads: 0
banking system :
-all the bank accout can be created, accessed,and clossed later.
-three type of account:current,saving,fixed deposit.
-each custormer can open more than one type of accounts.
-The transactions are deposit, withdraw, and view balance
-the account created with a deposit and creation date.
-After that money can be deposited and withdrawn.Balance will be updated accordingly
-a request for balande should display each individual account ballance as well as the total balance of all acoounts owned
customer class and an account class
customer class:
customer no (3 digits)
Name
address
account class:
creation date
Balance
type
-all the bank accout can be created, accessed,and clossed later.
-three type of account:current,saving,fixed deposit.
-each custormer can open more than one type of accounts.
-The transactions are deposit, withdraw, and view balance
-the account created with a deposit and creation date.
-After that money can be deposited and withdrawn.Balance will be updated accordingly
-a request for balande should display each individual account ballance as well as the total balance of all acoounts owned
customer class and an account class
customer class:
customer no (3 digits)
Name
address
account class:
creation date
Balance
type
Like I said, if this is an assignment, work on it some yourself, and if you get stuck, post the code you've written so far, and ask if we can help troubleshoot your already written code.
We don't do your homework for you-- we help you figure out your problems. Many of us here (not including me, though) are excellent programmers, but we're not willing to help unless you're willing to help yourself first.
We don't do your homework for you-- we help you figure out your problems. Many of us here (not including me, though) are excellent programmers, but we're not willing to help unless you're willing to help yourself first.
Alex Cavnar, aka alc6379
•
•
Join Date: Dec 2009
Posts: 1
Reputation:
Solved Threads: 0
-2
#6 Dec 16th, 2009
C++ Syntax (Toggle Plain Text)
#include "stdafx.h" #include <iostream.h> #include <conio.h> #include <windows.h> struct accounts{ int acnum1; int acnum2; int acnum3; double balance1; double balance2; double balance3; }; typedef struct accounts account; account init (account); account deposit (account); account withdraw (account); void query (account); void showall (account); int main(int argc, char* argv[]) { account bank; bank = init (bank); char transaction; while (transaction != 'E'){ cout<<"\n++++++++++\n"; cout<<"WORLD BANK\n"; cout<<"\n++++++++++\n\n"; cout<<"deposit -----> <press> D\n"; cout<<"withdraw -----> <press> W\n"; cout<<"Query -----> <press> Q\n"; cout<<"Show All -----> <press> S\n"; cout<<"Exit -----> <press> E\n"; cout<<"\n\n"; cout<<"please select your transaction :"; cin>>transaction; switch(transaction){ case 'D': bank = deposit(bank); break; case 'W': bank = withdraw(bank); break; case 'Q': query(bank); break; case 'S': showall(bank); break; case 'E' || 'e': exit(0); break; default: "please select one of the items from the menu item"; break; } system("CLS"); } return 0; } account init (account buffer){ buffer.acnum1 = 11111; buffer.acnum2 = 22222; buffer.acnum3 = 33333; buffer.balance1 = 0; buffer.balance2 = 0; buffer.balance3 = 0; return buffer; } account deposit (account bank){ int ac_num; double balance,deposit_amt; cout<<"\nenter account number"; cin>>ac_num; switch(ac_num){ case 11111: cout<< "enter deposit amount "; cin>>deposit_amt; bank.balance1 = bank.balance1 + deposit_amt; balance = bank.balance1; system("CLS"); cout<<"TRANSACTION APPROVED"; cout<<"\n++++++++++++++++++++++\n\n\n\n"; cout<<"Balance on your account :\n"<<"#"<<ac_num<<" is $"<<balance; cout<<"\n\n\npresss ne button to continue"; cout<<endl; getch(); break; case 22222: cout<< "enter deposit amount "; cin>>deposit_amt; bank.balance2 = deposit_amt + bank.balance2; balance = bank.balance2; system("CLS"); cout<<"TRANSACTION APPROVED"; cout<<"\n++++++++++++++++++++++\n\n\n\n"; cout<<"Balance on your account :\n"<<"#"<<ac_num<<" is $"<<balance; cout<<"\n\n\npresss ne button to continue"; cout<<endl; getch(); break; case 33333: cout<< "enter deposit amount "; cin>>deposit_amt; bank.balance3 = deposit_amt + bank.balance3; balance = bank.balance3; system("CLS"); cout<<"TRANSACTION APPROVED"; cout<<"\n++++++++++++++++++++++\n\n\n\n"; cout<<"Balance on your account :\n"<<"#"<<ac_num<<" is $"<<balance<<".00"; cout<<"\n\n\npresss ne button to continue"; cout<<endl; getch(); break; default: cout<<"acount number does not exist"; break; } return bank; } account withdraw (account bank){ int ac_num; double balance,withdrawl_amt; cout<<"\nenter account number"; cin>>ac_num; switch(ac_num){ case 11111: cout<< "enter withdrawl amount "; cin>>withdrawl_amt; bank.balance1 = bank.balance1 - withdrawl_amt; balance = bank.balance1; system("CLS"); cout<<"TRANSACTION APPROVED"; cout<<"\n++++++++++++++++++++++\n\n\n\n"; cout<<"Balance on your account :\n"<<"#"<<ac_num<<" is $"<<balance; cout<<"\n\n\npresss ne button to continue"; cout<<endl; getch(); break; case 22222: cout<< "enter withdrawl amount "; cin>>withdrawl_amt; bank.balance2 = bank.balance2 - withdrawl_amt; balance = bank.balance2; system("CLS"); cout<<"TRANSACTION APPROVED"; cout<<"\n++++++++++++++++++++++\n\n\n\n"; cout<<"Balance on your account :\n"<<"#"<<ac_num<<" is $"<<balance; cout<<"\n\n\npresss ne button to continue"; cout<<endl; getch(); break; case 33333: cout<< "enter withdrawl amount "; cin>>withdrawl_amt; bank.balance3 = bank.balance3 - withdrawl_amt; balance = bank.balance3; system("CLS"); cout<<"TRANSACTION APPROVED"; cout<<"\n++++++++++++++++++++++\n\n\n\n"; cout<<"Balance on your account :\n"<<"#"<<ac_num<<" is $"<<balance<<".00"; cout<<"\n\n\npresss ne button to continue"; cout<<endl; getch(); break; default: cout<<"acount number does not exist"; break; } return bank; } void query (account bank){ int ac_num; cout<<"\nenter account number"; cin>>ac_num; switch(ac_num){ case 11111: system("CLS"); cout<<"TRANSACTION APPROVED"; cout<<"\n++++++++++++++++++++++\n\n\n\n"; cout<<"Balance on your account :\n"<<"#"<<ac_num<<" is $"<<bank.balance1; cout<<"\n\n\npresss ne button to continue"; cout<<endl; getch(); break; case 22222: system("CLS"); cout<<"TRANSACTION APPROVED"; cout<<"\n++++++++++++++++++++++\n\n\n\n"; cout<<"Balance on your account :\n"<<"#"<<ac_num<<" is $"<<bank.balance2; cout<<"\n\n\npresss ne button to continue"; cout<<endl; getch(); break; case 33333: system("CLS"); cout<<"TRANSACTION APPROVED"; cout<<"\n++++++++++++++++++++++\n\n\n\n"; cout<<"Balance on your account :\n"<<"#"<<ac_num<<" is $"<<bank.balance3<<".00"; cout<<"\n\n\npresss ne button to continue"; cout<<endl; getch(); break; default: cout<<"acount number does not exist"; break; } } void showall (account bank){ system("CLS"); cout<<"DISPLAYING ALL EXISTING ACCOUNTS"; cout<<"\n++++++++++++++++++++++++++++++\n"; cout<<"ACCOUNT\t\t\t\tBALANCE\n\n\n"; cout<<"-------\t\t\t\t-------\n"; cout<<bank.acnum1<<"\t\t\t\t"<<bank.balance1<<"\n"; cout<<bank.acnum2<<"\t\t\t\t"<<bank.balance2<<"\n"; cout<<bank.acnum3<<"\t\t\t\t"<<bank.balance3<<"\n"; cout<<"\n\n\npress ne key to continue"; cout<<endl; getch(); }
this is a suck code
i hated it
kill it
Last edited by peter_budo; Dec 17th, 2009 at 2:09 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks)
![]() |
Similar Threads
- can any one send me a jsp source code of an e-banking project (JSP)
- Banking System (VB.NET)
- Plzzzz help me to solving the Problem to make banking System.... (Java)
- Php banking system help (PHP)
Other Threads in the C++ Forum
- Previous Thread: Display error
- Next Thread: Using functions from another class
Views: 6760 | Replies: 6
| Thread Tools | Search this Thread |
Tag cloud for C++
algorithm api array arrays assignment beginner binary c++ c++borland c/c++ calculator char class classes code compile compiler constructor conversion convert count delete dll dynamic encryption error file files filestream forms fstream function functions game givemetehcodez graph graphics gui helpwithhomework homework http iamthwee input int lazy linker list loop loops map math matrix member memory multidimensional network newbie number object objects opengl output parameter pointer pointers problem program programming project qt random read reading recursion recursive reference server sort sorting spoonfeeding string strings struct student studio template templates text time tree variable vc++ vector video visual visualstudio win32 window windows winsock






