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
Computer Science & Information Technology
You might also like to view...
The default printer is indicated by a green square
Indicate whether the statement is true or false
Computer Science & Information Technology
A fixed layout sets the width of the page elements as a percent of the available screen width. ?
Answer the following statement true (T) or false (F)
Computer Science & Information Technology