Important alert: (current site time 7/16/2013 8:08:47 AM EDT)
 

VB icon

Bank Operation Using OOP

Email
Submitted on: 3/30/2013 12:38:19 AM
By: Jake Rodriguez Pomperada  
Level: Beginner
User Rating: Unrated
Compatibility: C++ (general)
Views: 422
author picture
(About the author)
 
     If you find my work useful please send me an email at jakerpomperada@yahoo.com and jakerpomperada@gmail.com People here in the Philippines who wish to contact me can reach me at my mobile numbers 09993969756 and 09154628025. My facebook address is jakerpomperada@yahoo.com. Skype address: jakerpomperada Thank you and Happy Programming Everyone. Regards, Mr. Jake Rodriguez Pomperada, MAED-IT Freelance Software Developer / Web Developer / Computer and Electronics Technician
 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.
				
//**************************************
// Name: Bank Operation Using OOP
// Description:If you find my work useful please send me an email at 
jakerpomperada@yahoo.com and jakerpomperada@gmail.com
People here in the Philippines who wish to contact me can reach me
at my mobile numbers 09993969756 and 09154628025. 
My facebook address is jakerpomperada@yahoo.com.
Skype address: jakerpomperada
Thank you and Happy Programming Everyone.
Regards,
Mr. Jake Rodriguez Pomperada, MAED-IT
Freelance Software Developer / Web Developer / Computer and Electronics Technician
// By: Jake Rodriguez Pomperada
//
//This code is copyrighted and has// limited warranties.Please see http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=14065&lngWId=3//for details.//**************************************

#include <iostream.h>
#include <iomanip.h>
#include <conio.h>
class	bank
{
char name[20];
int acno;
char actype[20];
int bal;
public :
void opbal(void);
void deposit(void);
void withdraw(void);
void display(void);
};
void bank :: opbal(void)
{
cout<<endl<<endl;
cout<<"Enter Name :";
cin>>name;
cout<<"Enter A/c no. :";
cin>>acno;
cout<<"Enter A/c Type :";
cin>>actype;
cout<<"Enter Opening Balance:";
cin>>bal;
}
void bank :: deposit(void)
{
cout<<"Enter Deposit amount :";
int deposit=0;
cin>>deposit;
deposit=deposit+bal;
cout<<"\nDeposit Balance = "<<deposit;
bal=deposit;
}
void bank :: withdraw(void)
{
int withdraw;
cout<<"\nBalance Amount = "<<bal;
cout<<"\nEnter Withdraw Amount :";
cin>>withdraw;
bal=bal-withdraw;
cout<<"After Withdraw Balance is "<<bal;
}
void bank :: display(void)
{
cout<<endl<<endl<<endl;
cout<<setw(50)<<"DETAILS"<<endl;
cout<<setw(50)<<"name "<<name<<endl;
cout<<setw(50)<<"A/c. No. "<<acno<<endl;
cout<<setw(50)<<"A/c Type "<<actype<<endl;
cout<<setw(50)<<"Balance "<<bal<<endl;
}
void main()
{
clrscr();
bank o1;
int choice;
	do
	{
		cout<<"\n\nChoice List\n\n";
		cout<<"1) To assign Initial Value\n";
 cout<<"2) To Deposit\n";
 cout<<"3) To Withdraw\n";
 cout<<"4) To Display All Details\n";
 cout<<"5) EXIT\n";
 cout<<"Enter your choice :-";
 cin>>choice;
 switch(choice)
 {
 case 1: o1.opbal();
 			break;
 case 2: o1.deposit();
 			break;
		case 3: o1.withdraw();
 			break;
 case 4: o1.display();
 			break;
			case 5: goto end;
 }
}while(1);
end:
}


Other 232 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments


 There are no comments on this submission.
 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.