1、1编写一种基于对象得程序,规定:(1)定义一种时间类 Time,类内有私有数据组员 hour(小时)、minute( 分 钟 ) 、 sec( 秒 ), 公 有 组 员 函 数set_time()、show_time()。(2)set_time() 函 数 与 show_time() 函 数 在 类 内 定 义 。set_time() 作 用 就 是 从 键 盘 输 入 时 间 、 分 钟 、 秒 得值,show_time()得作用就是在屏幕上显示时间、分钟、秒得值。(3)在 main()函数定义 Time 类得对象 t1,并调用 set_time()函数给时间赋值,调用 show_time()函数输出时间得值。#include using namespace std;class Time {public: void set_time() {cin>>hour; cin>>minute; cin>>sec; } void show_time() {cout<using namespace std;class Box{public: void get_value(); void volume(); private: float lengh; float width; float height; };void Box::get_value(){ cout<<"please input lengh, width,height:"; cin>>lengh; cin>>width; cin>>height;}void Box::volume(){ cout<<"volmue of box1 is "<