网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

( 11 )有如下程序:

#include<iostream>

using namespace std;

class Monitor{

public:

Monitor ( char t ) : type ( t ) {}

void print ( ) const

{cout<<"The type of monitor is"<<type<<endl;}

private:

char type;

};

class Computer{

public:

Computer ( int i , char c ) : 【 11 】 {}

void Print () const

{cout<<"The computer is"<<id<<endl;mon.Print ( ) ; }

private:

int id;

Monitor mon;

};

const Computer myComputer ( 101,'B' ) ;

myComputer .Print ( ) ;

return 0;

}

请将程序补充完整,使程序在运行时输出:

The computer is 101

'The type of monitor i.s 8


参考答案

更多 “ ( 11 )有如下程序:#includeiostreamusing namespace std;class Monitor{public:Monitor ( char t ) : type ( t ) {}void print ( ) const{cout"The type of monitor is"typeendl;}private:char type;};class Computer{public:Computer ( int i , char c ) : 【 11 】 {}void Print () const{cout"The computer is"idendl;mon.Print ( ) ; }private:int id;Monitor mon;};const Computer myComputer ( 101,'B' ) ;myComputer .Print ( ) ;return 0;}请将程序补充完整,使程序在运行时输出:The computer is 101'The type of monitor i.s 8 ” 相关考题
考题 Monitor的含义是()

考题 有如下程序: include using namespace std; class Monitor{ public: Monitor(cha 有如下程序:include<iostream>using namespace std;class Monitor{public:Monitor(char t):type(t){ }void Print( )const{cout<<"The type of monitor is"<<type private:char type;};class Computer{public:Computer(int i,char C) :______{}void Print( )const{eout<<"The computer is"<<id<<endl;mort.Print( );}private:int id;Monitor mon;};int main( ){const Computer myComputer(101,'B');myComputer.Print( );return 0;}请将程序补充完整,使程序在运行时输出:The computer is 101The type of monitor is B

考题 A(74)is a device that enables the computer to handle sounds.A.network cardB.video cardC.sound cardD.monitor

考题 A (74) is a device that enables the computer to handle sounds.A.network cardB.video cardC.sound cardD.monitor

考题 标清终端的monitor可以监视几路信号() A.8B.9C.10D.11

考题 ● A (74) is a device that enables the computer to handle sounds.(74)A. network cardB. video cardC. sound cardD. monitor

考题 The project schedule is more than a document that lays out the activities over time to represent the time dimension of the project, it is a management tool to be used for decision making. As such , the schedule is used by the project management team to()A.Measure, delay, record, distribute, analyze, and direct B.Plan, schedule, monitor, control, report, and forecast C.Promote, highlight, monitor, control, forecast, and report D.Emphasize, visualize, analyze, conceptualize, report and record

考题 You need feedback to 【monitor】 progress.A. stop B. achieve C. access D. check

考题 阅读下列说明和C++代码,填写程序中的空(1)~(6),将解答写入答题纸的对应栏内。 【说明】 以下C++代码实现一个简单绘图工具,绘制不同形状以及不同颜色的图形。部分类及其关系如图6-1所示。 【C++代码】 #include?#include?using?namespace?std;class?DrawCircle?{??????//绘制圆形,抽象类? ? ? public: (1);//定义参数为?int?radius,?int?x,?inty? ?virtual~DrawCircle()?{?}};class?RedCircle:public?DrawCircle?{????//绘制红色圆形? ? ? ? public: void?drawCircle(intradius,?int?x,?int?y)?{cout??drawCircle?=?drawCircle;? }? ?virtual~shape()?{?}? public:? ?virtual?void?draw()?=?0;};class?Circle:public?Shape?{????//圆形? ? private:? ? ?int?x,y,radius;? ? public:? Circle(int?x,inty,int?radius,DrawCircle?*drawCircle)? (3)? {? this->x?=?x;? ?this->y?=?y;? ? this->radius?=?radius; }? ? ? public:? void?draw(){? drawCircle?-> (4); }};int?main(){Shape?*redCirclenew?Circle(100,100,10,????(5)????);//绘制红色圆形? Shape?*greenCircle=new?Circle(100,100,10, (6)??);//绘制绿色圆形redCircle >draw();? ?greenCircle?->draw();? ?return?0;}