Question: class BankAccount { public: void SetName ( string newName ) ; / / ( a ) Declare the function that sets the balance double SetBalance
class BankAccount
public:
void SetNamestring newName;
a Declare the function that sets the balance
double SetBalancedouble a;
void Print cout name has $ balance endl;
private:
string name;
b Declare the missing data item
double
;
void BankAccount::SetNamestring newName
name newName;
c Define member function to set the balance
int main
BankAccount myChecking;
d Below, set myCheckings name to "PiggyBank"
and set balance to $
e Below, output the bank account's name and balance.
return ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
