Question
Write a C++ program to create class named Account to perform basic operations on a saving bank account. Make necessary assumptions wherever required.
Answer :
Word Count : 220
__________ __________ ______ _________ _____ _________ __________ ____ _________ ________.
________ ______ ____ _______ ___ ___ _______.
______ _______ _________ ____ _______.
___ ________ _______ ___ ________ ____ ________ ____ ________ ________.
_________ ______ ___ __________ _______ _________ ______.
________ _____ _______ ____ ______ _____ _______ ____ ________.
____ ___ _____ ____ _____ ______ ___ ____ ________ __________.
______ _____ ______ ___ __________ _________ __________ _______.
_________ ________ _______ ________ ___ _____ ____ _____ ____.
____ _______ _______ ______ _________ _____ _________ _________ _________ _________ __________ _____.
_____ _____ ___ __________ __________ ____ ___ _____ ________.
__________ ____ _____ _________ ___ __________.
______ ______ ____ ___ ____.
___ ________ ______ __________ ___ _______ _____ _________ _______ _______.
________ _________ _______ ____ _______ ______ ___ ____ ________ __________ _________.
__________ __________ ___ __________ _____ ___ _____ _________ __________ ____ ______ _______.
_____ _____ ______ __________ _______.
________ _________.
Skip in 10
#include<iostream.h>
#include<conio.h>
#include<string.h>
class account
{
public:
int ac;
char type;
char cname[20];
float bal,d,w;
account(int a,char b[],float c)
{
ac=a;
strcpy(cname,b);
bal=c;
}
void deposit();
void widthdraw();
void disp();
};
class saving:public account
{
int rate;
char type;
public:
saving(int x, char y[],float z, char t,int r):account(x,y,z)
{
rate=r;
type=t;
}
void deposit();
void withdraw();
void disp();
};
void saving::deposit()
{
cout<<"Enter deposit amount";
cin>>d;
bal=bal+d;
}
void saving::withdraw()
{
cout<<"Enter withdraw
________ ______ ____ _______ ___ ___ _______.
______ _______ _________ ____ _______.
___ ________ _______ ___ ________ ____ ________ ____ ________ ________.
_________ ______ ___ __________ _______ _________ ______.
________ _____ _______ ____ ______ _____ _______ ____ ________.
____ ___ _____ ____ _____ ______ ___ ____ ________ __________.
______ _____ ______ ___ __________ _________ __________ _______.
_________ ________ _______ ________ ___ _____ ____ _____ ____.
____ _______ _______ ______ _________ _____ _________ _________ _________ _________ __________ _____.
_____ _____ ___ __________ __________ ____ ___ _____ ________.
__________ ____ _____ _________ ___ __________.
______ ______ ____ ___ ____.
___ ________ ______ __________ ___ _______ _____ _________ _______ _______.
________ _________ _______ ____ _______ ______ ___ ____ ________ __________ _________.
__________ __________ ___ __________ _____ ___ _____ _________ __________ ____ ______ _______.
_____ _____ ______ __________ _______.
________ _________.
IGNOU ACADEMY
Your IGNOU journey, made easier.
- Solved Assignments
- Study Notes
- Guess Papers
- Question Papers
Continue Reading — It's Free
Sign in with Google to unlock more of this answer.
✓ Free access
✓ Unlock up to 60% of the answer
✓ No payment required
✓ Unlock up to 60% of the answer
✓ No payment required
Quick Google sign-in. No separate registration form.