Hi I'm into a code in which I have to Design a class named Account that contain:
1. Int data field named "id" for the account.
2. Double data field named "balance" for the account.
3. Double data field named annualInterestRate that stores the current interest rate.
4. A no-arg constructor that creats a default account with "id 0, balance 0, and annualInterestRate 0."
5. Create a function named getMonthlyInterestRate() that returns the monthly interest rate.
6. A function named withdraw that withdraws a specified amount from the account.
7. A function named deposits a specified amount to the account.
My question is how do I create a named "getMonthlyInterestRate() that returns the monthly interest rate. This what I have so far.
[/TEXT]
#include <cstdlib>
#include <iostream>
using namespace std;
class Account
{
private:
int id;
double balance;
double annualInteresetRate;
public:
Account ()
{
id = 0;
balance = 0;
annualInterestRate = 0;
}
int getId()
{
return id;
}
int getBalance()
{
return balance;
}
int getAnnualInterestRate()
{
return AnnualInterestRate;
}
int main(int argc, char *argv[])
{
system("PAUSE");
return EXIT_SUCCESS;
}