Examlex

Solved

Given the Following Class Definition, How Could You Use the Constructor

question 10

Multiple Choice

given the following class definition, how could you use the constructor to assign values to an object of this class?
Class CDAccount
{
Public:
CDAccount) ;
CDAccountfloat interest, float newBalance) ;
Float getBalance) ;
Float getRate) ;
Void setRatefloat interest) ;
Void setBalancefloat newBalance) ;
Private:
Float balance, rate;
};
And the following object declaration
CDAccount myAccount;


Definitions:

Nominal Rate

The interest rate before adjustment for inflation, not reflecting the real cost of borrowing or the real return on an investment.

Compounded Monthly

The routine of accruing interest monthly, which incorporates calculating interest on the initial principal as well as on the interest that has previously been accrued.

Salary Increase

An increment in the amount of money earned by an employee on a regular basis, often annually or based on a performance review.

Total Return

The overall return on an investment over a specific period, including both capital gains and income, such as dividends or interest.

Related Questions