更多“●Graphical displays of accumulated cost and labor hours, plotted as a function of time, ar ”相关问题
  • 第1题:

    使用VC6打开考生文件夹下的工程test33_3。此工程包含一个test33_3.cpp,其中定义了表示时间的类Time,但Time类定义并不完整。请按要求完成下列操作,将程序补充完整。

    (1)定义类Time的私有数据成员hours、minutes和seconds,它们都是int型的数据,分别表示时间的小时、分和秒。请在注释“//**1**”之后添加适当的语句。

    (2)完成类Time缺省构造函数的定义,该函数将数据成员hours、minutes和seconds的值初始化为0,请在注释“//** 2**”之后添加适当的语句。

    (3)完成类Time带参构造函数的定义,该函数将数据成员hours、minutes和seconds的值分别初始化为参数h、m和s的值,请在注释“//**3**”之后添加适当的语句。

    (4)完成类Time中运算符“+”的重载,注意小时、分和秒在相加时的进位问题。请在注释“//**4**”之后添加适当的语句。

    注意:除在指定位置添加语句之外,请不要改动程序中的其他内容。

    程序输出结果如下:

    8:17:11

    源程序文件test33_3.cpp清单如下:

    include <iostream.h>

    class Time

    {

    //** 1 **

    public:

    Time ( )

    {

    //** 2 **

    seconds=0;

    }

    Time(int h, int m, int s)

    {

    //** 3 **

    minutes=m;

    seconds=s;

    }

    Time operator +(Time&);

    void gettime();

    };

    Time Time::operator +(Time& time)

    {

    //** 4 **

    s=time.seconds+seconds;

    m=time.minutes+minutes+s/60;

    h=time.hours+hours+m/60;

    Time result(h,m%60,s%60);

    return result;

    }

    void Time::gettime()

    {

    cout<<hours<<":"<<minutes<<":"<<seconds<<end1;

    }

    void main( )

    {

    Time t1(3,20,15),t2(4,56,56),t3;

    t3=t1+t2;

    t3.gettime();

    }


    正确答案:(1) int hoursminutesseconds; (2) hours=0; minutes=0; (3) hours=h; (4) int hms;
    (1) int hours,minutes,seconds; (2) hours=0; minutes=0; (3) hours=h; (4) int h,m,s; 解析:本题主要考查考生对于类的构造函数和运算符重载的掌握。构造函数可以有一个或多个参数,所以构造函数是可以重载的。而在类Time运算符“+”重载时,特别要注意重载函数要返回的是Time型的值,而分和秒是逢60进1的,不是逢 100进1或者单独相加各自的部分。

  • 第2题:

    YouaremanaginganOracleDatabase11gASMinstancewithadiskgroupdg01havingthreedisks.Oneofthedisksinthediskgroupbecomesunavailablebecauseofpowerfailure.YouissuedthefollowingcommandtochangetheDISK_REPAIR_TIMEattributefrom3.6hoursto5hours:ALTERDISKGROUPdg01SETATTRIBUTE’disk_repair_time’=’5h’;Towhichdisksinthediskgroupwillthenewvaluebeapplicable?()

    A.alldisksinthediskgroup

    B.alldisksthatarecurrentlyinOFFLINEmode

    C.alldisksthatarenotcurrentlyinOFFLINEmode

    D.alldisksinthediskgrouponlyifallofthemareONLINE


    参考答案:C

  • 第3题:

    ()are?those?costs?that?cannot?be?directly?traced?to?a specific?project?and?therefore?will?be?accumulated?and allocated?equitably?over?multiple?projects?by?some?approved and?documented?accounting?procedure.

    A.Direct costs
    B.Operation costs
    C.Indirect costs
    D.Implement costs

    答案:C
    解析:
    本题翻译:
    ()是指不能直接追溯到特定项目的成本,因此将通过一些批准和记录的会计程序在多个项目上平均累计和分配。
    A.直接成本B.运营成本C.间接成本D.实施成本
    本题考查成本的分类,不能直接的就可以理解为间接,间接成本:来自一般管理费用科目或几个项目共同负担的项目成本所分摊给本项目的费用。
    而成本管理中不是涉及运营成本、实施成本。排除BD选项。所以此题选择C选项。

  • 第4题:

    You are managing an Oracle Database 11g ASM instance with a disk group dg01 having three disks. One of the disks in the disk group becomes unavailable because of power failure. You issued the following command to change the DISK_REPAIR_TIME attribute from 3.6 hours to 5 hours:ALTER DISKGROUP dg01 SET ATTRIBUTE ‘disk_repair_time‘ = ‘5h‘;To which disks in the disk group will the new value be applicable?()

    A. all disks in the disk group

    B. all disks that are currently in OFFLINE mode

    C. all disks that are not currently in OFFLINE mode

    D. all disks in the disk group only if all of them are ONLINE


    参考答案:C

  • 第5题:

    使用VC6打开考生文件夹下的工程test15_3。此工程包含一个test15_3.cpp,其中定义了类Time和Timex,Timex公有继承Time,但定义并不完整。请按要求完成下列操作,将程序补充完整。

    (1)完成类Time构造函数的定义,将数据成员hours和minutes分别初始化为参数new_hours和new_minutes的值。请在注释“//**1**”之后添加适当的语句。

    (2)完成类Timex的构造函数的定义,注意参数的传递。请在注释“//**2**”之后添加适当的语句。

    (3)请按时间格式“hour:minute”和“hour:minute:second”分别输出对象time1和time2所表示的时间,注意必须使用已经定义的成员函数。请在注释“//**3**”之后添加适当的语句。

    输出结果如下:

    20:30

    10:45:34

    注意:除在指定的位置添加语句外,请不要改动程序中的其他语句。

    源程序文件test15_3.cpp清单如下:

    include<iostream.h>

    class Time

    {

    public:

    Time(int new hours,int new_minutes)

    {

    // ** 1 **

    }

    int get_hours();

    int get_minutes();

    protected:

    int hours,minutes;

    };

    int Time::get_hours()

    {

    return hours;

    }

    int Time::get_minutes()

    {

    return minutes;

    }

    class Timex:public Time

    {

    public:

    Timex(int new hours,int new_minutes,int new_seconds);

    int get_seconds();

    protected:

    int seconds;

    };

    // ** 2 **

    {

    seconds=new_seconds;

    }

    int Timex::get_seconds()

    {

    return seconds;

    }

    void main()

    {

    Time time1(20,30);

    Timex time2(10,45,34);

    // ** 3 **

    }


    正确答案:(1) hours=new_hours; minutes=new_minutes; (2) Timex::Timex(int new_hoursint new_minutes int new_seconds):Time(new_hoursnew_minutes) (3) couttime1.get_hours()":"time1.get_minutes()end1; couttime2.get_hours()":"time2.get_minutes()":"time2.get_seconds()endl;
    (1) hours=new_hours; minutes=new_minutes; (2) Timex::Timex(int new_hours,int new_minutes, int new_seconds):Time(new_hours,new_minutes) (3) couttime1.get_hours()":"time1.get_minutes()end1; couttime2.get_hours()":"time2.get_minutes()":"time2.get_seconds()endl; 解析:本题主要考查考生对于类和派生类构造函数的定义以及成员函数的使用,注意(2)中派生类构造函数中必须包括向基类传递参数的调用,应该使用参数列表完成这一操作。

  • 第6题:

    10、以下 jQuery 事件处理程序的写法错误的是?

    A.$("#id").hover(function(){ //some code },function(){ //other code });

    B.$(function(){ //some code });

    C.$.click(function(){ //some code });

    D.$("#id").click(function(){ //some code });


    click;change