예제 #1
0
        //Part A-->(b)-->(ii)

        /*ii)	the other one will add a value of time received as another Time2 object.
         * Public void addtime(Time2 atime) { … }*/
        public void addtime(Time2 atime)
        {
            hour   += atime.Hour;
            minute += atime.Minute;
            second += atime.Second;
            check();
        }
예제 #2
0
        } // end Time2 three-argument constructor

        // Time2 constructor: another Time2 object supplied as an argument
        public Time2(Time2 time)
            : this(time.Hour, time.Minute, time.Second)
        {
        }