Question

Write a C++ program to create class named Account to perform basic operations on a saving bank account. Make necessary assumptions wherever required.

25 Nov 2017
Answer :
Word Count : 220

#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
Skip in 10
Top
📞
Call Support Instant phone assistance IGNOU BCSL 32 2016 - Write a C++ program to create class named Account to perform basic ope | IGNOU Academy
→
🟢
WhatsApp Chat Fast live messaging
→
Email Us Business enquiries & support
→