Question: C++ Question 1 Classes and Objects Create a class called BAccount for bank account with data members accno (account no), aname (account name), type (account

C++

Question 1 Classes and Objects

C++ Question 1 Classes and Objects Create a class called BAccount for

Create a class called BAccount for bank account with data members accno (account no), aname (account name), type (account type), hasMBanking (has mobile banking service activated?), bal (account balance) and bankname (name of bank). Implement the constructors, setters and getters. Include in your implementation two other special functions called deposit and withdraw, both that pass the amount, amount as parameter to be deposited or withdrawn. These functions do not return any value. Table of Sample Data In the main function, create 5 objects and initialize these objects with the sample data given in the table to store the data. There are two ways that you may employ to display. (a) Firstly, to display the objects directly using the getter functions. Do this in your main function. (b) Secondly, before displaying, create an array called, BAcc[], of size 5 to store the above 5 objects, then display the records. If you receive the same outputs as in (a), then the output may indicate good solutions in your codes. (c) Using the functions, deposit and withdraw, credit K220.55 for Emily and draw K500.21 out from Jason's account. Show the results for these two by displaying their records

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!