Question: ************Hello dont do 5 and 6. I got stuck on doing the funtions of Question 4 that belong to the Bank.cpp. thats the only part

************Hello dont do 5 and 6. I got stuck on doing the funtions of Question 4 that belong to the Bank.cpp. thats the only part I need done. I already did 1-3 below are my codes for those questions. They are needed to do Bank.cpp I believe. Files are Account.cpp, Account_main.cpp, and ACCOUNT.h. I took the screech shots well so you are not missing information.Thank you in advance.******************

************Hello dont do 5 and 6. I got stuck on doing thefuntions of Question 4 that belong to the Bank.cpp. thats the onlypart I need done. I already did 1-3 below are my codes

// file: Account.cpp

// 4/4/2018

//

#include

#include "ACCOUNT.h"

using namespace std;

Account:: Account(): balance(0) {}

Account:: Account(double amount,double rate): balance(amount), interest_rate(rate){}

void Account::deposit(double amount)

{

balance += amount;

}

bool Account::withdraw(double amount)

{

bool status;

if (amount> balance){

balance -= 5; //penalty

status = false;

} else{

balance -= amount;

status =true;

}

return status;

}

double Account::query()

{return balance;}

void Account::set_interest_rate(double rate)

{ interest_rate=rate; }

double Account::get_interest_rate()

{return interest_rate; }

void Account::add_interest()

{

balance=balance+balance*interest_rate/100.0;

}

// file: Account_main.cpp // 4/4/2018

#include

#include "ACCOUNT.h"

using namespace std;

main() { Account savings(10000,6); int years=0; while(savings.query()

}

// file: ACCOUNT.h

// 4/4/2018

//

#ifndef ACCOUNT_H

#define ACCOUNT_H

class Account

{

private:

double balance;

double interest_rate; // for example, interest_rate=6 means 6%

public:

Account();

Account(double amount, double rate);

void deposit(double);

bool withdraw(double); //returns true if enough money, returns false otherwise

double query();

void set_interest_rate(double rate);

double get_interest_rate();

void add_interest();

};

#endif

D CSE 202 Lab 1 C cse.csusb.edu/kaylese202/lab1.htm Apps YouTubeCAS-California Statef Facebao a Amazancom:Online Online C Compile The lowi tho iles ipla Ispe in, and DONOT COPYAND PASTE the following codes each in its o file statu statu talse trn tulark deserspticn include is trwn

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!