Question: In C++. Design a class called Customer: A field name ID in the Customer class of int data type A field named balance in the
In C++. Design a class called Customer:
A field name ID in the Customer class of int data type
A field named balance in the Customer class of double data type
A field named currentRate in the Customer class that stores the current annual interest rate
A constructor (no-arg type) in the Customer class that creates a default class with the 3 fields set to 0
The mutator and accessor functions for the 3 fields
A getMonthlyRate function that returns the monthly-interest-rate
A withdraw function that withdraws a stated amount (meaning you would sent an amount to the function either as a number or variable and it would withdraw the amount from the balance)
A deposit function that deposits a stated amount (meaning you would sent an amount to the function either as a number or variable and it would deposit the amount to the balance)
Implement the class by writing a test program that creates an object with a customer ID of 3245, a balance of 40000, and an interest rate of 6.5%. Use the withdraw function to withdraw $5,000, use the deposit function to deposit $6,000, and print the balance, the monthly interest.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
