翻译句子We can make music ourselves if we play an instrument or sing.
翻译句子We can make music ourselves if we play an instrument or sing.
相关考题:
----Let’s go to the West Hill Park by taxi.---- Oh, it is not far away from here. We _______take a taxi.A. couldn’t B. mustn’t C. needn’t D. can’t
We ______ booked. Look, this restaurant is almost empty. A. must haveB. can’t haveC. should haveD. needn’t have
We’ve got a full house, so if you really want to keep your room this afternoon, we’ll have to charge you 50% of the price. (翻译)
阅读下列说明、C++代码和运行结果,填补代码中的空缺(1)~(5),将解答填入答题纸的对应栏内。 【说明】 对部分乐器进行建模,其类图如图5-1所示,包括:乐器(Instrument)、管乐器(Wind)、打击乐器(Percussion)、弦乐器(Stringed)、木管乐器(Woodwind)、铜管乐器(Brass)。图5-1 类图 下面是实现上述设计的C++代码,其中音乐类(Music)使用各类乐器(Instrument)进行演奏和调音等操作。【C++代码】 includeiostream using namespace std; enum Note { /* 枚举各种音调 */ MIDDLE_C, C_SHARP, B_FLAT }; class Instrument{ /* 抽象基类,乐器 */ public: (1) ; //play函数接口 virtual void adjust()=0; //adjust函数接口 }; class Wind (2) { public: void play(Note n) { coutWind.play()nend1; } void adjust() { coutWind.adjust()end1; } }; /* 类Percussion和Stringed实现代码略 */ class Brass (3) { public: void play(Note n) { coutBrass.play()nend1; } void adjust() { coutBrass.adjust ()end1; } }; class Woodwind : public Wind { public: void play(Note n) { coutWoodwind.play()nend1; } }; class Music { public: void tune(Instrument* i) { i-play(MIDDLE_C); } void adjust(Instrument* i) { i-adjust(); } void tuneAll( (4) e[], int numIns) { /* 为每个乐器定调 */ for( int i=O; inumlns; i++) { this-tune(e[i]); this-adjust(e[i]); } } }; /* 使用模板定义一个函数size,该函数将返回数组array的元素个数,实现代码略 */ int main() { Music* music= (5) Music(); Instrument* orchestra[]={ new Wind(), new Woodwind() }; music-tuneAll(orchestra, size(orchestra)); /* size数组orchestra的元素个数 */ for (int i=0; isize (orchestra), i++) delete orchestra[i]; delete music; } 本程序运行后的输出结果为: Wind.play() 0 Wind.adjust() Woodwind.play() 0 Wind.adjust()
27.If we travel by car ,we_________.A. can't travel fifty or one hundred miles a dayB. can-t stop at a hotel to spend the nightC. can make our own timetable 'D. can travel to a very far place in several minutes
阅读下列说明、C++代码和运行结果,填补代码中的空缺,将解答填入答题纸的对应栏内。[说明]对部分乐器进行建模,其类图如下图所示,包括:乐器(Instrument)、管乐器(Wind)、打击乐器(Percussion)、弦乐器(Stringed)、木管乐器(Woodwind)、铜管乐器(Brass)。类图下面是实现上述设计的C++代码,其中音乐类(Music)使用各类乐器(Instrument)进行演奏和调音等操作。using namespace std; enum Note(/*枚举各种音调*/ MIDDLE_C,C_SHARP,B_FLAT }; classInstrument{/*抽象基类,乐器*/ public: ______; //play函数接口 virtual voidadjust()=0; //adjust函数接口 }; class Wind ______{ public: void play(Note n) { cout<<"Wind.play() "<<n<<endl; } void adjust(){cout<<"Wind.adjust()"<<endl; } ); /*类Percussion和Stringed实现代码略*/ class Brass ______{ public: void play(Note n) {cout<<"Brass.play() "<<n<<endl; } void adjUSt(){cout<<"Brass.adjust()"<<endl;) }; classWoodwind:public Wind{ public: void play(Note n) { cout<<"Woodwind.play()"<<n<<endl; } }; class MusiC { public: voidtune(Instrument*i) { i->play(MIDDLE_C.; } voidadjust(Instrument*i){ i->adjust(); } void tuneAll(______ e[],int numIns){ /*为每个乐器定调*/ for(int i=0; i<numIns; i++){ this->tune(e[i]); this->adjust(e[i]); } } }; /*使用模板定义一个函数size,该函数将返回数组array的元素个数,实现代码略*/ int main(){ Music*music=______ Music(); Instrument*orchestra[]={new Wind(),new Woodwind() }; music->tuneAll(orchestra,size(orchestra));/*size返回数组orchestra的元素个数*/ for(int i=0;i<size(orchestra);i++) deleteorchestra[i]; delete music; }本程序运行后的输出结果为:Wind.play()0 Wind.adjust() Woodwind.play()0 Wind.adjust()
阅读以下说明和Java程序,填补代码中的空缺,将解答填入答题纸的对应栏内。[说明]对部分乐器进行建模,其类图如下图所示,包括:乐器(Instrument)、管乐器(Wind)、打击乐器(Percussion)、弦乐器(Stringed)、木管乐器(Woodwind)、铜管乐器(Brass)。类图下面是实现上述设计的Java代码,其中音乐类(Music)使用各类乐器(Instrument)进行演奏和调音等操作。[Java代码] enum Note{/*枚举各种音调*/ MIDDLE_C,C_SHARP,B_FLAT; //其他略 } interfaceInstrument {/*接口,乐器*/ ______; //play方法接口 void adjust(); //adjust方法接口 } class Wind ______{ public voidplay(Note n) { System.out.println("Wind.play()"+n); } public void adjust(){System.out.println("Wind.adjust()");} } /*类Percussion和Stringed实现代码略*/ class Brass ______{ public voidplay(Note n) {System.out.println("Brass.play()"+n); } public voidadjust(){System.out.println("BrasS.adjust()");) } Class Woodwindextends Wind{ publicvoidplay(Note n){System.out.println("Woodwind.play()"+n); } } public classMusic{ voidtune(Instrument_i){i.play(Note.MIDDLE_C.; } voidadjust(Instrument i){i.adjust(); } voidtuneAll(______ e){ for(Instrumenti:e){ adjust(i); tune(i); } } public Static voidmain(String[] args){ Music music=______ Music(); Instrument[]orchestra={new Wind(), new Woodwind() }; music.tuneAll(orchestra); } }本程序运行后的输出结果为:Wind.adjust() Wind.play()MIDDLE_C Wind.adjust() Woodwind.play()MIDDLE_C