We reproduce the class Money here, in part:
```
class Money public:
Money( ); Money(int dollars, int cents);
Money(int dollars); Money(double amount);// other
public members
const Money operator+(const MoneyADD& amt2)ADD;
>>Need to add & and semicolon
int getCents( ) const;
int getDollars( ) const;
private:
int dollars;
int cents;
//other private members
```
Note that * is not overloaded in the class, but operator + is overloaded using an
operator function with the following declaration:
```
const Money operator+(const Money& amt2);
```
The question is: Given the declarations,
```
Money baseAmount(100, 60); // $100.60
Money fullAmount;
```
which of the following operations are legal? If so, why? If not, why not?
a)```
BaseAmount + 25;
```
b)```
25 + BaseAmount;
```
c)```
baseAmount = 2 * baseAmount;
```
d)```
baseAmount+baseAmount.
```
All except c) are legal.
You might also like to view...
Which of the following is NOT a factor to consider when automating processes?
A) Taking the time to create a process flow that describes the actions and reasons for those actions can reduce the chance of errors. B) Macros can be used to automate complex sets of actions. C) It is important to carefully think through all the actions that a macro will be executing to complete the tasks before saving the macro. D) Taking the time to create a process flow that describes the actions and reasons for those actions can save time.
The ________ ________ check box determines the application of alternating fill colors of table rows
Fill in the blank(s) with correct word