Question: please program this using c++ The program first queries the user for the size of the laundry load, between 1 and 3, inclusive. If the
please program this using c++
The program first queries the user for the size of the laundry load, between 1 and 3, inclusive. If the number entered is not 1, 2, or 3, it will be interpreted as 1.
Then, the program asks the user for the temperature: <= 0: use the default washing temperature; any other positive integer is the desired temperature.
Third, the program asks the user for the washing time: <= 0: use the default time; any other positive integer is the desired time
Your program should implement 3 different versions of the function with the identical function name, called "wash". But each version has a different number of arguments. This will allow the main() function to call wash() with three different number of arguments. The first version of wash() has 1 argument (just the laundry load enumerative type), the second version has 2 arguments: load and temperature (both are enumerative types), and the third version has 3 arguments (load, temp, time), the first 2 arguments are enumerative types and the third argument (time) is an integer.
For the first 2 versions of the "wash" function, the default value is to be used for the respective missing arguments. Within each "wash" function, simply print the laundry load (small, medium, large), washing temperature (cold, warm, hot) and the amount of time.
In the main function, depending on the values provided by the user, the correct "wash" function should be called.
Use the following laundry load enumerative type: 1: small, 2: medium, 3: large
The following for the temperature enumerative type:
< 50 degrees: cold
>= 50 and < 100 degrees: warm
>= 100 degrees: hot
The default temperature is 75, and the default time is by this formula: load-type * 7 + 11
You must declare and use the enumerative types!
If the user uses the default temperature, then the time will automatically be default as well. That is, the program should not ask the user to enter the washing time if the temperature entered is 0.
Finally, your program should ask the user if they would like to wash another load. The answer is a single character, which could be 'y', 'Y', 'n' or 'N'. If the user enters either 'y' or 'Y', the program should repeat and asks the user for all the parameters again.
Here are some examples:
Laundry load (1, 2 or 3): 2
Laundry Temperature: 80
Laundry Time: 0
You have selected: Medium laundry size, warm wash, 25 minutes
Would you like to do another laundry load? (y/n) y
Laundry load (1, 2 or 3): 1
Laundry Temperature: 110
Laundry Time: 14
You have selected: Small laundry size, hot wash, 14 minutes
Would you like to do another laundry load? (y/n) y
Laundry load (1, 2 or 3): 3
Laundry Temperature: 0
You have selected: Large laundry size, warm wash, 32 minutes
Would you like to do another laundry load? (y/n) n
Using c++
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
