In the previous chapters we wrote many programs using “Ask” functions which asks for program input and returned these values to the calling function. Why did we not call these functions “Get” functions?
What will be an ideal response?
It is important to name functions clearly as to their task. The Ask functions actually asked the user for input via cout and cin/getline statements. The Get function has a special meaning in C++, as the name of the function that returns class data to a calling function via an object.
You might also like to view...
A large company pays its salespeople on a commission basis. The salespeple each receive $200 per week plus 9% of their gross sales for that week. For example, a salesperson who sells $5000 worth of chemicals in a week receives $200 plus 9% of $5000, or a total of $650. Develop a C++ program that uses a while statement to input each salesperson’s gross sales for last week and calculates and displays that salesperson’s earnings. Process one salesperson’s figures at a time.
a) Account number (an integer) b) Balance at the beginning of the month c) Total of all items charged by this customer this month d) Total of all credits applied to this customer's account this month e) Allowed credit limit ``` Enter sales in dollars (-1 to end): 5000.00 Salary is: $650.00 Enter sales in dollars (-1 to end): 6000.00 Salary is: $740.00 Enter sales in dollars (-1 to end): 7000.00 Salary is: $830.00 Enter sales in dollars (-1 to end): -1 ```
In the accompanying figure, the item labeled with the number 3 is a ____ field.
A. text box B. check box C. menu D. radio button
In addition to sorting and filtering cells by content you can sort and/or filter by:
A) icon sets. B) Top/Bottom rules. C) the data bar. D) conditional formatting.
To use Ping-O-Matic, you enter the title and ____ of your blog and select the services that you wish to ping.
A. PING B. URL C. DNS D. HTTP