Question

Table 4 shows the rate of telephone calls for a telecommunication company. The program input for call time is a floating-point number in the form of HH. MM. For example:07:00

hours should be entered as 07.00 16:28 hours should be entered as 16.28 Assume that the code for getting user inputs has been taken care in the program. Also, the related variables have been declared as follow: Based on the Table 4 information, write the C++ code segment that implements the process to determine the calling rate.i. ii.Write the code segment that implements input validation so that the program should not accept times that are greater than 23:59. iii. Write the code segment that implements input validation so that the program should not accept input whose last two digits are greater than 59. Apply type casting to split the call input into hour and minutes. The formula to calculate minutes: minutes = (call - hour) * 100

Fig: 1

Fig: 2

Fig: 3

Fig: 4

Fig: 5

Fig: 6

Fig: 7

Fig: 8

Fig: 9

Fig: 10

Fig: 11

Fig: 12

Fig: 13

Fig: 14