Why is it an error to add a const modifier, as shown to the declaration for the member function input given here?

```
class BankAccount
{
public:
void input( ) const;
// other members
};
```


If an input routine actually contains code to do input, the function will not compile.

The purpose of and input function is to change the state of the calling object. The purpose of the const modifier placed as shown is to prevent compiling of code that changes the state of the calling object.

Computer Science & Information Technology

You might also like to view...

Which of the following is the proper method to apply the fliph filter to the following H1 element?

```

This is a test

``` a. ``` test.filters.style = fliph; ``` b. ``` test.filters( fliph ); ``` c. ``` test.filters( "fliph" ); ``` d. The filter cannot be applied to this element.

Computer Science & Information Technology

Refer to the following code snippet and identify the use of thesubstring()andtoLowerCase()methods. ? function pokerCard(cardSuit, cardRank) { … this.cardImage() = function() { var suitAbbr = this.suit.substring(0, 1).toLowerCase(); return suitAbbr + this.rankValue + ".png"; } }

A. To reset the text string in lowercase B. To extract the last letter of the string in lowercase C. To extract the first letter of the string in lowercase D. To set the lowercase as default

Computer Science & Information Technology

?Suppose the r2 (r squared) value for the linear regression is 0.85. You can state that the linear regression accounts for ____ percent of the variation in the dependent variable.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

If your Android application works with OpenGL ES versions 1.0, 2.0, and 3.0, which version should you specify in the Google Play store?

a. 1.0 b. 2.0 c. 3.0 d. All versions

Computer Science & Information Technology