Question
C++ please Declare a class Account with the following members: Private attributes to store a customer ID (int), balance (double), and an interest rate (double).
C++ please
-
Declare a class Account with the following members:
-
Private attributes to store a customer ID (int), balance (double), and an interest rate (double).
-
Accessors and Mutators for all of the attributes
-
The Mutator for customerID should ensure that values are between 10,000 and 99,999 (commas added for legibility).
-
Allow the user to try again until they get it right.
-
-
The Mutator for interest rate should validate that the interest rate is between 0 and 1.
-
Allow the user to try again until they get it right.
-
-
-
A public method, calculateInterest(), which will calculate and return the value of the interest accrued, calculated as (balance * interestRate)
-
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started