Question: Hey tutors, I need help with this c++ class exercise Solution Explorer BankAccount.h Client.cpp BankAccount.cpp + x BankAccount BankAccount(const std:string acNum) BankAccount Search Solution Explorer

Hey tutors, I need help with this c++ class exercise

Hey tutors, I need help with this c++ class exercise Solution ExplorerBankAccount.h Client.cpp BankAccount.cpp + x BankAccount BankAccount(const std:string acNum) BankAccount Search SolutionExplorer (Ctri+;) #include "BankAccount.h" Solution 'BankAccount' (1 of 1 project) #include BankAccount0-0 References BankAccount : : BankAccount() External Dependencies Header Files Resource Files

Solution Explorer BankAccount.h Client.cpp BankAccount.cpp + x BankAccount BankAccount(const std:string acNum) BankAccount Search Solution Explorer (Ctri+;) #include "BankAccount.h" Solution 'BankAccount' (1 of 1 project) #include BankAccount 0-0 References BankAccount : : BankAccount() External Dependencies Header Files Resource Files std: : cout Solution 'BankAccount' (1 of 1 project) Eclass BankAccount BankAccount 0-0 References 4 External Dependencies 5 private: //access specifier (modifier) . Client code does not have DIRECT to them. Header Files / /attributes, Data members Resource Files Source Files //public: //bad choice, not recomended ++ BankAccount.cpp std: : string accountNumber; BankAccount.h double accountBalance = 0; //initiallizing ++ Client.cpp 10 / /behaviors , methods, operations, function members 12 public: 13 BankAccount(); //a default constructor 14 BankAccount(const std: : string) ; // another constructor 15 BankAccount (const std: : string, const double) ; 16 17 void deposit(double) ; 18 double checkBalance(); 19 //challenge: write a fucntion to set the account number to some string provided by the user void setAccountNumber(std: : string ); //setter /mutator std: : string getAccountNumber(); //getter/ accessorBankAccount.h Client.cpp + X BankAccount.cpp Solution Explorer (Global Scope) main() + BankAccount #include "BankAccount.h" //Notice the double quotation marks, since this is a programmer created Search Solution Explorer (Ctri+;) //file. Not coming from the system 'libraries' Solution 'BankAccount' (1 of 1 project) BankAccount D-D References #include External Dependencies Ly Header Files Resource Files using std: :cout; Source Files ++ BankAccount.cpp int main() D h BankAccount.h ++ Client.cpp 10 / /BankAccount account; //declare a variable of type BankAccount 11 BankAccount anotherAccount("123abc") ; 12 13 / /Create an ' instance' object of type BankAccount 14 15 //account . deposit(25. 50) ; //calling the 'instance' function deposit 16 17 //cout ( : & const Book) : bool -use year to compare objects of type year. +operator

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 Programming Questions!