0% found this document useful (0 votes)
19 views2 pages

BankAccount Class Implementation Guide

Uploaded by

MD Al Islam
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views2 pages

BankAccount Class Implementation Guide

Uploaded by

MD Al Islam
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Program 1: Class & Objects

Write a class named as BankAccount. The class has following member


data and member functions.
Access Member Access Member Functions/ Methods
Modifier data/Attributes Modifier
Type Type

private char CusName[50] Public void setCusDetails()


{
This method will set the name
and ID of the customer. No cout in
this method.
}
float checkBalance()
{
// This method should return the
balance of the customer by taking
the input from the user.
}
char CusId[10] float depositMoney(float
amount)
{
// This method should allow user to
deposit money.
//no cout in this method
}
float accBalance float withdrawMoney(float
amount)
{
//write the method. This method
should allow user to withdraw
money
//no cout in this method

}
void showInfo()
{
// this method will print all
information (i.e. customer name, id,
deposit/withdraw/balance)
}
Create an object cusotmer1, customer 2 and access the above-mentioned
methods in the main(). Show the output on the console.
The main of the program is shown below:
int main()

BankAccount customer1,customer2;

[Link](); [Link]();

[Link](50000.00); [Link](20000.00);

[Link](); [Link]();

[Link](15000.00); [Link](5000.00);

[Link](); [Link]();

You might also like