网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
若vehicle=['train','bus','car','ship'],则vehicle.index('car')的结果是什么?
A.1
B.2
C.3
D.4
参考答案
更多 “ 若vehicle=['train','bus','car','ship'],则vehicle.index('car')的结果是什么? A.1B.2C.3D.4 ” 相关考题
考题
In order to cut down on the carbon emission, more people choose to travel_.A.by electric car, bicycle or planeB.by private car, bicycle or busC.by bus, electric car or planeD.by bicycle, bus or electric car
考题
使用VC6打开考生文件夹下的工程test17_1,此工程包含一个源程序文件test17_1.唧,但该程序运行有问题,请改正程序中的错误,使程序的输出结果如下:Vehicle messageCar messageVehicle message源程序文件test17_1.cpp 清单如下:include <iostream.h>class vehicle{int wheels;float weight;public:/***************** found *****************/void message(void){ cout<<"Vehicle message\n";}};class car:public vehicle{int passenger_load;public:/***************** found *****************/void message (void){cout>>"Car message\n";}};class truck:public vehicle{int passenger_load;float payload;public:int passengers(void){return passenger_load;}};void main(){vehicle * unicycle;unicycle=new vehicle;/***************** found *****************/unicycle.message()delete unicycle;unicycle=new car;unicycle->message();delete unicycle;unicycle=new truck;unicycle->message();delete unicycle;}
考题
若已定义了类Vehicle,则下列派生类定义中,错误的是A.class Car:Vehicle{/*类体略*/);B.class Car:public Car{/*类体略*/);C.class Car:public Vehicle{/*类体略*/);D.class Car:virtual public Vehicle{/*类体略*/);
考题
若vehicle=['train','car','bus','subway','ship','bicycle','car'],则vehicle.count('car')结果是什么?
A.carB.7C.1D.2
考题
若vehicle=[['train','car'],['bus','subway'],['ship','bicycle'],['car']],则len(vehicle)结果是什么?
A.1B.7C.6D.4
考题
若vehicle=[['train','car'],['bus','subway'],['ship','bicycle'],['car']],则len(vehicle[1][0])结果是什么?
A.3B.7C.6D.4
考题
若vehicle=[['train','car'],['bus','subway'],['ship','bicycle'],['car']],则len(vehicle[1])结果是什么?
A.2B.7C.6D.4
考题
22..What kind of car does Mrs Hill have?A. A fast and new car.B. A fast but old car.C. A slow and old car.D. A fast but small car.
考题
29. When people travel on business(出差) ,they usually take _________ .A. a train or a planeB. a boat or a trainC.a car or a boat .D.a plane or a car
考题
In order to cut down on the carbon emission,more people choose to travel______.A.by electric car,bicycle or planeB.by private car,bicycle or busC.by bus,electric car or planeD.by bicycle. bus or electric car
考题
阅读以下说明和Java代码,填充程序中的空缺,将解答填入答题纸的对应栏内。
[说明]
某应急交通控制系统(TraficControlSystem)在红灯时控制各类车辆(Vehicle)的通行,其类图如下图所示,在紧急状态下应急车辆在红灯时可通行,其余车辆按正常规则通行。
下面的Java代码实现以上设计,请完善其中的空缺。
[Java代码]abstract class Vehicle{public Vehicle(){ }abstract void run();};interface Emergency{ ______; ______;};class Car extends Vehicle{public Car(){ }void run(){ /*代码略*/ }};Class Truck extends Vehicle{public Truck(){ }void run() { /*代码略*/ }};class PoliceCar ______ {boolean isEmergency= false;public PoliceCar(){ }public PoliceCar(boolean b) {this.isEmergency=b; }public boolean isEmergent(){ return ______ }public void runRedLight(){ /*代码略*/ }};/*类Ambulance、FireEngine实现代码略*/public class TraficControlsystem { /*交通控制类*/private Vehicle[]V=new Vehicle[24];int numVehicles;public void control(){for {int i=0; i<numVehicles; i++){if(V[i]instanceof Emergency}else______. run();}}void add(Vehicle vehicle){ v[numVehicles++]=vehicle;}/*添加车辆*/void shutDown(){/*代码略*/}public static void main(String[]args){TraficC0ntrolSystem tcs=new TraficControlSystem();tcs.add(new Car());tcs.add(new PoliceCar());tcs.add(new Ambulance());tcs.add(new Ambulance(true));tcs.add(new FireEngine(true));tcs.add(new Truck());tcs.add(new FireEngine());tcs.control();tcs.shutDown();}}
考题
Travelling by train to Tokyo takes approximately one hour less _____ travelling by car.
A. for
B. with
C. as
D. than
考题
单选题How did the narrator and his aunt travel to see his father?A
By car.B
By bus.C
By ship.D
By train.
考题
单选题What is suggested about Ms. Forsyth?A
She is knowledgeable about cars.B
Her employer will pay for her vehicle.C
She is planning to buy her first vehicleD
Her current car is unreliable.
考题
单选题The text indicates that the Canadian airport officials seem to have ______.A
taken effective measures to solve the car-theft problemB
overestimated the seriousness of the car-theft problemC
failed to give proper attention to the car-theft problemD
realized the seriousness of the car-theft problem
考题
单选题Which type of transport may you take when the roads flood in Kolkata?A
A bus.B
A taxi.C
A car.D
A rickshaw.
考题
单选题— Does your father go to work by ______ car every day?— No, he sometimes takes ______ bus.A
a; theB
the; aC
不填; aD
a; 不填
考题
单选题11. abstract class Vehicle { public int speed() { return 0; } } 12. class Car extends Vehicle { public int speed() { return 60; } } 13. class RaceCar extends Car { public int speed() { return 150; }} ...... 21. RaceCar racer = new RaceCar(); 22. Car car = new RaceCar(); 23. Vehicle vehicle = new RaceCar(); 24. System.out.println(racer.speed() + “, „ + car.speed() 25. + “, “+ vehicle.speed()); What is the result?()A
0, 0,0B
150, 60, 0C
Compilation fails.D
150, 150, 150E
An exception is thrown at runtime.
考题
单选题It is _____ he is determined.A
buying a new car thatB
to buy a new car thatC
to buy a new car whatD
buying a new car which
考题
单选题_____A
By ship.B
By train.C
By plane.D
By bus.
热门标签
最新试卷