/* *copyright (c) 2014, Yantai University School of computer *all rights reserved. * File name: Test.cpp * Yang Hanning * Completion Date: March 18, 2015 * Version number: v1.0 * Problem Description: Increase the original time by one hour, one minute, and one second. * Input Description: Enter hours: minutes: seconds. * Program output: The time after the change */#include <iostream>using namespace Std;class time{public:void set_time (); void Show_time (); void add_a_sec (int n); Adds 1 seconds to void Add_a_minute (int n); Added 1 minutes void add_an_hour (int n); Added 1 hours private:bool is_time (int, int, int); This member function is set to private and is appropriate, please taste int hour; int minute; int sec;}; void Time::set_time () {char c1,c2; cout<< "Please enter the time (format Hh:mm:ss)"; while (1) {cin>>hour>>c1>>minute>>c2>>sec; if (c1!= ': ' | | c2!= ': ') cout<< "format is not correct, please re-enter" <<endl; else if (!is_time (hour,minute,sec)) cout<< "Time is illegal, please re-enter" <<endl; else break; }}void Time::show_time () {if (hour >24) hour=hour-24; Avoid early 25 26 hour situation cout<
Item three-???? Increase the input time by 1 hours, 1 minutes, and 1 seconds.