Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

My professor barely speaks English and refuses to actually teach us, he just say

ID: 3542824 • Letter: M

Question

My professor barely speaks English and refuses to actually teach us, he just says read the book and when you ask him any questions he just changes the subject to something he knows.

Anyways, here's the prompt(Can't change any variables or add variables, don't need to use any while/for loops and the computeinterest() method is for only 1 year, don't ask for how many years):
You have been developing a BankAccount class for Parkville Bank that contains several fields and functions. In previous chapters, you declared the interest rate to be static and constant; remove those modifiers as well as the definition of the interest rate as 0.03. Add a constructor to the class that accepts arguments for the account number, balance, and
interest rate. The account number is required, but both the balance and interest rate default to 0 if no argument is supplied to the constructor. If the account number is not between 1000 and 9999 inclusive, force it to zero. Modify the display function, if necessary, so that all BankAccount fields are displayed. Write a main() function that declares several BankAccount objects and confirm that the class works correctly. Save the file as BankAccount.cpp
.
b. Parkville Investment Consulting keeps track of clients

Explanation / Answer

please rate - thanks


this is technically 2 questions, answered the first


// Portfolio - Chapter 8
// Your name
// Project #

#include<iostream>
#include <stdio.h>
using namespace std;

class BankAccount
{
private:
int acctNum;
double balance;
double annualRate;
public:
BankAccount(int, double, double);
void enterAccountData();
double computeInterest(int);
void displayAccount();
double getBal();
};
BankAccount::BankAccount(int acct, double bal=0, double rate=0)
{
// provide definition for this constructor
if(acct>=0 && acct<=9999)
     acctNum=acct;
else
     acctNum=0;
balance=bal;
annualRate=rate;
}
void BankAccount::enterAccountData()
{cout<<"Enter account balance: ";
cin>>balance;
//provide definition for this method
}
double BankAccount::computeInterest(int years)
{return balance*annualRate*years;
//provide definition for this method
}
void BankAccount::displayAccount()
{cout<<"Account Number: "<<acctNum<<endl;
cout<<"Balance: $"<<balance<<endl;
cout<<"Annual interest rate: "<<annualRate*100<<endl<<endl;
//provide definition

}
double BankAccount::getBal()
{return balance;
//provide definition
}

int main()
{
BankAccount ba1(123456), ba2(1234), ba3(2345, 2345.67), ba4(3456, 4567.89, 0.025);
//provide code to display account information
ba1.displayAccount();
ba2.displayAccount();
ba3.displayAccount();
ba4.displayAccount();
system("pause");
return 0;

}




Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at drjack9650@gmail.com
Chat Now And Get Quote