For this assignment you are to implement a computer program which performs some simple calculations and prints the results to the screen. There are three parts to this assignment. In the first part, you will write a function that calculates the volume of a sphere with a given radius. The second part converts an amount of money in dollars into its largest note and coin constituents. Finally, the last part gets the computer to add two times together, which are specified in the 24hr clock notation. Your finished program (or programs), when run, should execute each of the three menus, if you are unable to complete a menu then credit will still be given for the work actually completed. When marking I will be looking at how your program is written as well as the output it produces – this, of course, means that you won’t be able to cheat. There is no single correct solution for this assignment; any program that correctly calculates the answers will be given a pass mark. To achieve higher grades, your program should make appropriate use of variables and functions in your solution. In particular, to obtain the top grades it is necessary to design your own functions and make correct use of them.
1. Volume of a sphere menu
Write a function that calculates the volume of a sphere, using the equation: 4/3Pi(r)cubed. You should write a function volumeForRadius() that takes a double as a parameter and returns a double containing the result of calculating the above equation. Your program should print 4 lines (one per radius), in the following format:
be added to the first time, and the result printed out in the same notation. Thus if the input is “1245 345″ the output should be 1600 which is the time 3 hours and 45 minutes after 12.45. Note: There are a few extra marks for spotting that a start time of 2300 with a duration of 200, gives an end time of 100, not 2500. But don’t worry if you can’t get that working. The program’s output should be in the format: Start time is 1245. Duration is 345. End time is 1600 and should calculate results for the following values: Start Time 1045 800 2300 Duration 345 435 300 Hint: Again, this program requires you to use integer division and remainder (modulus) operator. It may help if you split the integers into hours and minutes first, then perform the calculations before combining them back into one value. Submission Guideline: Upload your project in Moodle. Save your work in CPP using the format. The extension of the file MUST BE in the Format OOP_CWK1_Lastname_Firstname.cpp








