#include<iostream.h>
#include<conio.h>
class balance
{
protected:
                int total,date;
public:
                void input()
                {
                                cout<<"Enter Total Balance:- ";
                                cin>>total;
                                cout<<"Enter Date:- ";
                                cin>>date;
                }
                void output()
                {
                                cout<<"\nTotal Balance:- "<<total;
                                cout<<"\nDate:- "<<date;
                }
};
class withdraw:public balance
{
protected:
                int cno,camo;
public:
                void input()
                {
                                balance::input();
                                cout<<"Enter Customer No:- ";
                                cin>>cno;
                                cout<<"Enter Amount:- ";
                                cin>>camo;
                }
                void output()
                {
                                balance::output();
                                cout<<"\nCustomer No:- "<<cno;
                                cout<<"\nAmount:- "<<camo;
                }
};
class deposit:public withdraw
{
private:
                int noc,total;
public:
                void input()
                {
                                withdraw::input();
                                cout<<"Enter Number of Customer:- ";
                                cin>>noc;
                                cout<<"Enter Total Amount:- ";
                                cin>>total;
                }
                void output()
                {
                                withdraw::output();
                                cout<<"\nNumber of Customer:- "<<noc;
                                cout<<"\nTotal Amount:- "<<total;
                }
};
void main()
{
                clrscr();
                deposit d;
                d.input();
                d.output();
                getch();
}
Advertisements