Write a c++ program to define a base class for account, derive two classes namely saving account and current account.
define member of all three classes accordingly.
Account-> acct_no, customer name, customer_address,withdrawal, deposition
Saving Accout-> fd
Current account-> checque book issue, deposition, withdrwal
#include<iostream>
using namespace std;
class Account{
private:
string acct_no, customer name, customer_address;
double withdrawal, deposition;
};
class SavingAccount: Account{
private:
double fd;
};
class CurrentAccount: Account{
private:
string checque_book_issue;
double deposition, withdrwal;
};
Comments
Leave a comment