Lab 2 for CIS 67 1. Take program coins.cpp (the original version) and make the following modifications: Write a function named coins_instruct and place it after your main function. void coins_instruct() { ... put some instructions for the user in here. See Fig. 3.17 for example. } Insert the function prototype line: void coins_instruct(); before your main function and insert a call to this function coins_instruct(); at the beginning of your main function - before you read in the user's name. 2. Write 3 one-line functions that have these prototypes: //Calculates and returns the total value (in cents) of the coins //for a given amount of pennies, nickles //(the function arguments) int calc_coins_value(int, int); //Calculates the dollars for a given value in cents (the argument) int calc_dollars(int); //Calculates the change value (cents) for a given amount in cents int calc_change(int); As an example, the function cacl_dollars would be: int calc_dollars(int total_cents) { return total_cents / 100; } a. Place the 3 prototypes before function main. b. Place the 3 functions after function main. c. Replace the expression part of each assignment statement in your main function with a call to one of these functions. For example, dollars = calc_dollars(total_cents); d. Compile, build, and run the final program. 3. Explain how function calc_coins_value "gets its input". Explain what happens to the value returned by calc_coins_values - the function output. What type of data does C++ expect calc_coins_value to return and what type of data does the function expect as its inputs? How do you think C++ knows this. 4. Read one of the documents on my home page about the C++ debugger and try stepping through this program 1 line at a time using the debugger. Click on the Locals tab and Observe how the variables in the watch window change as you go in and out of each function. Click the icon for step over {}! when the next line to execute (indicated by yellow arrow) begins with cin or cout. For all other lines, click the icon for step into {!}. What are the names of the local variables in a watch window during each function execution? Answer this for all functions including main. 5. Assignment due before lab next week. Turn in program and sample run after it has been modified to use functions. Give answers to questions in 3 and 4 above. Also, do programming project #9, p. 225. I recommend you use a switch statement to select the statements to execute based on the user code. Each case of the switch should calculate the bill for that kind of user. For code 'c' and 'i', you will need if statements to calculate the bill.