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

// First, write a void function \"GetInputs\" that prompts the user to // enter

ID: 3655750 • Letter: #

Question

// First, write a void function "GetInputs" that prompts the user to // enter the initial balance of the account and the // type of the customer('r' - regular customer, 'v' - VIP, // 'e' - bank employee, and 'c' - corporate customer) // secondly, write a value returning function "ComputeBalance" // to compute and return the // new balance of the account. The interest rate on the account is // different based on customer type: // 'r' -- 2.3% // 'v' -- 4.2% // 'e' -- 2.6% // 'c' -- 3.0% #include using namespace std; // declare the function "GetInputs" here // declare the function "GetInputs" here // Function GetInputs definition is provided below // declare the function "ComputeBalance" here // declare the function "ComputeBalance" here // ComputeBalance definition is provided below int main() { float balance; char customerType; // activate/call the function "GetInputs" here to get the values of // the initial balance of the account and the customer type GetInputs(balance, customerType); // activate the function "ComputeBalance" here to update the balance of the account balance = ComputeBalance(balance, customerType); cout << endl<< "The ending balance is " << balance << endl; return 0; } // GetInputs will prompt the user to enter the initial balance of an account, and // the type of customer // Complete the definition of function "GetInputs" below // write the function heading of "GetInputs" below { cout << "Please enter the starting balance of the account: " ; cin >> balance; cout << "Please enter the customer user type (r, e, c, v): " ; cin >> type; return ; } // ComputeBalance will update the balance with interest added to the starting balance of the // account. The interest rate is based on the customer type. // A switch statement needs to be used here to determine the correct interest rate to use for computation // You may assume that only valid types are provided and case sensitive. // Complete the definition of function "ComputeBalance" below float ComputeBalance(float balance, char type) { float rate; switch // Complete the switch statement started above and the function definition // 'r' -- 2.3% // 'v' -- 4.2% // 'e' -- 2.6% // 'c' -- 3.0% }

Explanation / Answer

#include#includeusing namespace std; void GetInputs(float &balance,char &customerType); float ComputeBalance(float balance, char type); int main() { float balance; char customerType; GetInputs(balance, customerType); cout