You should form into groups of 2 to write this program.
You are to write a program that converts from 24-hour notation to 12-hour notation or from 12-hour notation to 24-hour notation. You should allow the user to choose which conversion they want.
For example, the 24-hour notation 14:25 converts to 2:25 PM in 12-hour notation. The input should be given as 2 integers and the am or pm can be stored in a char variable as either 'a' or 'p'. However, when you output the time in 12-hour notation, you should output PM not p.
The group should start by deciding what functions are needed. At minimum, you should have an input function, an output function, a function to convert from 24 to 12-hour notation and a function to convert from 12 to 24-hour notation. You should then agree on pre and post-conditions for all the functions.
Pre-conditions are conditions that someone using a function must meet before calling the function. A pre-condition might be what the function's parameters should represent. For example, a paramater int& hour should represent hours using 12-hour notation before the function call. Post-conditions are the expected result of the function. A post-condition might specify what a reference parameter contains when the function returns. For example, a parameter int& hour represents the hour in 24-hour notation after the funtion returns.
Now, split the functions up among the group members. Each member should write one or more functions on their own, not worrying about how the other functions are being implemented as long as the pre and post-conditions are being met.
Finally, each member will write their own main function. The program should allow the user to continue converting as long as they want.