Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Instructions Open the bank account pdf file on the homepage of this course (The following pictures are from the bank account pdf). Type the

C++

Instructions

Open the bank account pdf file on the homepage of this course (The following pictures are from the bank account pdf). Type the contents into notepad. Compile the implementation file. Compile the program. Please pay attention to what is happening in each section as you create the code. Create the files from the pdf. You are only copying the code, but attempting to pay attention to the task at hand to help in your understanding of classes.

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

//Main program

#include #include

#include "bankAccount.h"

using namespace std;

void menu(); void subMenu(); int search(bankAccount list[], int length, int acctNum) void addCustomer(bankAccount list[], int& length); void processCustomer(bankAccount list[], int length, int acctNum); void printCustomersData(bankAccount list[], int length);

int main() { bankAccount customersList[10]; int choice; int numOfCustomer = 0; int acctNumber; char discard; cout > choice; cin.get(discard); cout > acctNumber; cout > choice; cin.get(discard); cout

void menu() { cout

void subMenu() { cout

int search(bankAccount list[], int length, int acctNum) { for (int i = 0; i

void addCustomer(bankAccount list[], int& length) { string name; string acctType; double deposit; double interestRate; if (length > acctType; cout > deposit; cout > interestRate; cout

void processorCustomer(bankAccount list[], int length, int acctNum) { int index; double amount; index = search(list, length, acctNum); if (index != -1) { subMenu(); int selection; cin >> selection; cout > amount; cout > amount; cout > selection; cout

void printCustomersData(bankAccount list[], int length) { for (int i = 0; i bankAccount #include #include using namespace std; class bankAccount { public: void setdata(string name, string accType, double bal, double intRate); void deposit(double ant); void withdraw(double amt); double getInterest(); void updateBalance(); void print() const; int getAccount Number() const; string getAccountHolderName() const; string getAccountType() const; double getBalance() const; double getInterestRate() const; bankAccount(string name - ", string acc Type - double bal - 0.0, double intRate = 0.0); private: static int num; string accountHolderName; string accountType; int account Number; double balance; double interestRate; }; Page 1 bankAccount Imp #include #include "bankAccount.h" #include using namespace std; int bankAccount:: num = 100; void bankAccount::setdata(string name, string accType, double bal, double intRate) { accountHolderName = name; accountType accType; ; account Number = num; num = num + 100; balance = bal; interestRate - intRate / 100; } void bankAccount::deposit(double amt) { balance = balance + amt; } void bankAccount::updateBalance() { balance = balance + balance interestRate; } double bankAccount::getInterest() { return balance * interestRate; } void bankAccount::withdraw(double amt) { cout #include #include "bankAccount.h" using namespace std; void menu(); void subMenu(); int search(bankAccount list[], int length, int acct Num); void addCustomer (bankAccount list[], int& length); void processCustomer(bankAccount list[], int length, int acctNum); void printCustomersData(bankAccount list[], int length); int main() { bankAccount customersList[10]; int choice; int numofCustomer = 0; int acctNumber; char discard; cout > choice; cin.get(discard); cout > acctNumber; cout > choice; cin.get(discard); cout > acct Type; cout > deposit; cout > interestRate; cout > selection; cout > amount; cout > amount; cout > selection; cout #include using namespace std; class bankAccount { public: void setdata(string name, string accType, double bal, double intRate); void deposit(double ant); void withdraw(double amt); double getInterest(); void updateBalance(); void print() const; int getAccount Number() const; string getAccountHolderName() const; string getAccountType() const; double getBalance() const; double getInterestRate() const; bankAccount(string name - ", string acc Type - double bal - 0.0, double intRate = 0.0); private: static int num; string accountHolderName; string accountType; int account Number; double balance; double interestRate; }; Page 1 bankAccount Imp #include #include "bankAccount.h" #include using namespace std; int bankAccount:: num = 100; void bankAccount::setdata(string name, string accType, double bal, double intRate) { accountHolderName = name; accountType accType; ; account Number = num; num = num + 100; balance = bal; interestRate - intRate / 100; } void bankAccount::deposit(double amt) { balance = balance + amt; } void bankAccount::updateBalance() { balance = balance + balance interestRate; } double bankAccount::getInterest() { return balance * interestRate; } void bankAccount::withdraw(double amt) { cout #include #include "bankAccount.h" using namespace std; void menu(); void subMenu(); int search(bankAccount list[], int length, int acct Num); void addCustomer (bankAccount list[], int& length); void processCustomer(bankAccount list[], int length, int acctNum); void printCustomersData(bankAccount list[], int length); int main() { bankAccount customersList[10]; int choice; int numofCustomer = 0; int acctNumber; char discard; cout > choice; cin.get(discard); cout > acctNumber; cout > choice; cin.get(discard); cout > acct Type; cout > deposit; cout > interestRate; cout > selection; cout > amount; cout > amount; cout > selection; cout

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

=+1. Which of the following is true of boys compared with girls?

Answered: 1 week ago

Question

Which form of proof do you find most persuasive? Why?

Answered: 1 week ago