Question: Please write c++ program per instructions and make sure to meet all the requirements. Please also add comments for the codes. Thanks. HW6 (Graded out

Please write c++ program per instructions and make sure to meet all the requirements. Please also add comments for the codes. Thanks.

Please write c++ program per instructions and make sure to meet allthe requirements. Please also add comments for the codes. Thanks. HW6 (Gradedout of 100) Design a bank account class named Account that hasthe following private member variables . accountNumber of type int balance oftype double and the following public member functions ownerName of type stringwithdraw (amount) function to withdraw a specified amount from the account. Thefunction should first check if there is sufficient balance in the account(greater or equal to the withdrawal amount). If the balance is sufficient,withdrawal is processed. Otherwise the withdrawal is not made and the functionreturns an error indication. deposit (amount) function to deposit a specified amountof money to the account. The function should first check if the

HW6 (Graded out of 100) Design a bank account class named Account that has the following private member variables . accountNumber of type int balance of type double and the following public member functions ownerName of type string withdraw (amount) function to withdraw a specified amount from the account. The function should first check if there is sufficient balance in the account (greater or equal to the withdrawal amount). If the balance is sufficient, withdrawal is processed. Otherwise the withdrawal is not made and the function returns an error indication. deposit (amount) function to deposit a specified amount of money to the account. The function should first check if the deposit amount is positive. If it is positive, deposit is processed Otherwise the deposit is not made and the function returns an error indication. setAccountNumber (number): Amutator function that checks if the number is>0. If so it sets the accountNumber of the account to number. Otherwise, it does not set and returns an error indication. setownerName (name):A mutator function that checks if name is a string that consists only of letters and spaces. If so, it sets the ownerName of the account to name. Otherwise, it does not set and returns an error indication . . . setBalance (amount): A mutator function that checks if amount is >= 0, if so, it sets the . getAccountNumber ): An accessor function that returns the account number. This function . getOwnerName (): An accessor function that returns the owner name on the account. This . getBalance () An accessor function that returns the account balance. This function is later balance of the account to amount. Otherwise, it it does not set and returns an error indication. is later called by the displayAccountInfo ) function. function is later called by the displayAccountInfo () function. called by the displayAccountInfo () function. HW6 (Graded out of 100) Design a bank account class named Account that has the following private member variables . accountNumber of type int balance of type double and the following public member functions ownerName of type string withdraw (amount) function to withdraw a specified amount from the account. The function should first check if there is sufficient balance in the account (greater or equal to the withdrawal amount). If the balance is sufficient, withdrawal is processed. Otherwise the withdrawal is not made and the function returns an error indication. deposit (amount) function to deposit a specified amount of money to the account. The function should first check if the deposit amount is positive. If it is positive, deposit is processed Otherwise the deposit is not made and the function returns an error indication. setAccountNumber (number): Amutator function that checks if the number is>0. If so it sets the accountNumber of the account to number. Otherwise, it does not set and returns an error indication. setownerName (name):A mutator function that checks if name is a string that consists only of letters and spaces. If so, it sets the ownerName of the account to name. Otherwise, it does not set and returns an error indication . . . setBalance (amount): A mutator function that checks if amount is >= 0, if so, it sets the . getAccountNumber ): An accessor function that returns the account number. This function . getOwnerName (): An accessor function that returns the owner name on the account. This . getBalance () An accessor function that returns the account balance. This function is later balance of the account to amount. Otherwise, it it does not set and returns an error indication. is later called by the displayAccountInfo ) function. function is later called by the displayAccountInfo () function. called by the displayAccountInfo () function

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!