Suppose we have a WashingMachine class and we have a function called raisePrice, which passes in an amount to raise the price by. After the class has been in use by a number of clients, we wish to add more to the raisePrice function, passing in two parameters, the amount to raise the price by and the date the price is being raised. We should:
A. make a new function, perhaps calling it raisePriceAndDate, which passes in these two parameters, while keeping the old raisePrice function in the class.
B. change the raisePrice function to pass in the two parameters.
C. change the amount parameter from a float type to a struct object type that has data members for amount and date.
D. turn the class into a class template and use DataType for the function name
A
You might also like to view...
Explain why businesses have shown a growing interest in data warehousing in recent years.
What will be an ideal response?
The Comments field in the accompanying figure is a(n) ____.
A. text field B. text area C. comment field D. hidden field
What is a good line height for the web?
a. 1.25 b. 1.4 c. 2.0 d. 1.5
What do you click to look for 3-D effects that you can apply to a chart?
A. Shape Effects button B. Shape Styles button C. Shape Formats button D. Shape Designs button