⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 exttime.h

📁 This file implements the ExtTime member functions and the Time class member functions
💻 H
字号:
//******************************************************************
// SPECIFICATION FILE (exttime.h)
// This file gives the specification of an ExtTime abstract data
// type.  The Time class is a public base class of ExtTime, so
// public operations of Time are also public operations of ExtTime.
//******************************************************************
#include "time.h"

enum ZoneType {EST, CST, MST, PST, EDT, CDT, MDT, PDT};

class ExtTime : public Time
{
public:
    void Set( /* in */ int      hours,
              /* in */ int      minutes,
              /* in */ int      seconds,
              /* in */ ZoneType timeZone );
        // Precondition:
        //     0 <= hours <= 23  &&  0 <= minutes <= 59
        //  && 0 <= seconds <= 59  &&  timeZone is assigned
        // Postcondition:
        //     Time is set according to the incoming parameters

    void Write() const;
        // Postcondition:
        //     Time has been output in the form HH:MM:SS ZZZ
        //     where ZZZ is the time zone

    ExtTime( /* in */ int      initHrs,
             /* in */ int      initMins,
             /* in */ int      initSecs,
             /* in */ ZoneType initZone );
        // Precondition:
        //     0 <= initHrs <= 23  &&  0 <= initMins <= 59
        //  && 0 <= initSecs <= 59  &&  initZone is assigned
        // Postcondition:
        //     Class object is constructed
        //  && Time is set according to the incoming parameters

    ExtTime();
        // Postcondition:
        //     Class object is constructed
        //  && Time is 0:0:0 Eastern Standard Time
private:
    ZoneType zone;
};


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -