given the following class definition, how could you use the constructor to assign values to an object of this class?

class CDAccount
{
public:
CDAccount();
CDAccount(float interest, float newBalance);
float getBalance();
float getRate();
void setRate(float interest);
void setBalance(float newBalance);
private:
float balance, rate;
};

and the following object declaration
CDAccount myAccount;
a. myAccount = CDAccount(float myRate, float myBalance);
b. myAccount = CDAccount {myRate, myBalance};
c. myAccount = CDAccount[myRate, myBalance];
d. myAccount = CDAccount(myRate, myBalance);

d. myAccount = CDAccount(myRate, myBalance);








Computer Science & Information Technology

You might also like to view...

All of the following are terms related to part of the boot process EXCEPT ________

A) ROM B) RAM C) USB D) CMOS

Computer Science & Information Technology

To Freeze Columns and/or rows

A) scroll through a worksheet and click on the Freeze button. B) use the View Tab, Window Group, and click Freeze Panes. C) adjust settings to control how the worksheet will print. D) first indicate where data starts on a new printed page.

Computer Science & Information Technology