网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
The lower-level classes(known as subclasses or derived classes) ( )state andbehavior from the higher-level class(known as a super class or base class).
A.request
B.inherit
C.invoke
D.accept
B.inherit
C.invoke
D.accept
参考答案
参考解析
解析:低层的类(也称子类或派生类)从高层类(也称为超类或基类)中继承了状态和行为。
更多 “The lower-level classes(known as subclasses or derived classes) ( )state andbehavior from the higher-level class(known as a super class or base class).A.request B.inherit C.invoke D.accept ” 相关考题
考题
有以下程序: included using namespace std; class Base { public: Base( ) { x=0; }
有以下程序:included<iostream>using namespace std;class Base{public:Base( ){x=0;}int x;};class Derived1:virtual public Base{public:Derived1( ){x=10;}};class Derived2:virtual public Base{public:Derived2( ){x=20;}};class Derived: public Derived1,protected Derived2{ };int main( ){Derived obj;cout<<obj. x<<endl;return 0;}该程序运行后的输出结果是______。
考题
下面程序的运行结果是#includeclass base{protected:int a;public:base(){ cout ”0”;}class basel:virtual base}public:base 1(){cout ”1”;}};class base2:virtual base{public:base2(){cout ”2”;(};class derived:public base1,public base2{public:derived(){cout ”3”;}};void main(){derived obj;cout }A.0123B.3120C.0312D.3012
考题
有如下程序: include using namespace std; class BASE { public
有如下程序: #include<iostream> using namespace std; class BASE { public: ~BASE(){cout<<"BASE";} }; class DERIVED:public BASE { public: ~DERIVED(){cout<<"DERIVED";} }; int main(){DERIVEDx;retum 0;} 执行后的输出结果是A.BASEB.DERIVEDC.BASEDERIVEDD.DERIVEDBASE
考题
有如下程序:includeusing namespace std;class Base{protected:Base(){cout
有如下程序: #include<iostream> using namespace std; class Base{ protected: Base(){cout<<'Base';} Base(char c){cout<<c;} }; class Derived:public Base{ public: Derived(char c){cout<<c;} }; int main(){ Derived d('Derived'); return 0; } 执行这个程序屏幕上将显示输出( )。A.DerivedB.DerivedBaseC.BaseDerivedD.DerivedDerived
考题
若有以下程序:include using namespace std;class Base{public: Base ( ) {x=0; } in
若有以下程序: #include <iostream> using namespace std; class Base { public: Base ( ) { x=0; } int x; }; class Derivedl : virtual public Base { public: Derivedl () { x=10; } }; class Derived2 : virtual public Base { public: Derived2 () { x=20; } }; class Derived : public Derivedl,protected Derived2{ }; int main ( ) { Derived obj; cout<<obj .x<<end1; return 0; } 该程序运行后的输出结果是 ( )。A.20B.30C.10D.0
考题
有如下程序:include using namespace std;class BASE{public:~BASE(){cout
有如下程序: #include <iostream> using namespace std; class BASE{ public: ~BASE(){cout<<"BASE";} }; class DERIVED:public BASE{ public: ~DERIVED(){cout<<"DERIVED";} }; int main(){DERIVED x;return 0;} 执行后的输出结果是A.BASEB.DERIVEDC.BASEDERIVEDD.DERIVEDBASE
考题
有如下程序:includeusing namespace std;class BASE{public:~BASE( ){cout
有如下程序: #include<iostream> using namespace std; class BASE{ public: ~BASE( ){cout<<"BASE";} }; class DERIVED:public BASE{ public: ~DERIVED( ){cout<<"DERIVED";} }; int main( ){DERIVED x;return 0;} 程序的输出结果是A.BASEB.DERIVEDC.BASEDERIVEDD.DERIVEDBASE
考题
下面程序的输出结果是【】。include using namespace std; class base { protected: int
下面程序的输出结果是【 】。include <iostream>using namespace std;class base{protected:int a;public:base(){cout<<"0":}};class basel: virtual public base{public:base1(){ cout<<"1";}};class base2 : virtual public base{public:base2(){cout<<"2";}};class derived : public base1,public base2{public:derived () {cout<<"3"; }}int main (){derived obj;cout<<end1;return 0;}
考题
若有以下程序: include using namespace std; class Base { public:void who(){ cout
若有以下程序:include <iostream>using namespace std;class Base{public:void who(){cout<<"class Base"<<end1;}};class Derivedl : public Base{public:void who(){cout<<"class Derivedl"<<end1;}};class Derived2 : public Base{public:void who(){cout<<"class Derived2"<<end1;}};int main(){Base *p;Derivedl obj1;Derived2 obi2;p=obj 1;p=obj2;p->who ( );return 0;}则该程序运行后的输出结果是【 】。
考题
若有以下程序:include using namespace std; class Base public: Base() { x=0;} in
若有以下程序: #include <iostream> using namespace std; class Base public: Base() { x=0; } int x; }; class Derivedl: virtual public Base public: Derived1() { x=10; } }; class Derived2: virtual public Base publici Derived2() x=20; }; class Derived :public Derived1,protected Derived2 {}; int main() Derived obj; cout<<obj.x<<end1; return 0; } 该程序运行后的输出结果是A.20B.30C.10D.0
考题
若有以下程序: include using namespace std;class Base{public:Base ( ){x=0;}int x
若有以下程序:# include <iostream>using namespace std;class Base{public: Base ( ) { x=0; } int x;};class Derived1 : virtual public Base{public: Derived1 ( ) { x=10; }}; class Derived2 : virtual public Base{public: Derived2 () { x=20; }};class Derived : public Derived1,protected Derived2{ };int main(){ Derived obj; cout<<obj.x<<end1; return 0;} 该程序运行后的输出结果是A.10B.20C.30D.0
考题
有下列程序: include using namespace std; class Base { public: Base(){cout
有下列程序: #include<iosteram.h> using namespace std; class Base { public: Base(){cout<<"BB"; f(); } void f(){cout<<"Bf";} }; class Derived:public Base { public: Derived(){cout<<"DA.BBBfDDB.BBDfDDDfC.DDD.DDBBBf
考题
若有以下程序:include using namespace std;class Base{public:Base (){x=0;}int x;}
若有以下程序: #include <iostream> using namespace std; class Base { public: Base () { x=0; } int x; }; class Derived1 : virtual public Base { public: Derived1 () { x=10; } }; class Derived2 : virtual public Base { public: Derived2 () { x=20; } }; class Derived : public Derived1,protected Derived2{ }; int main() { Derived obi; cout<<obj.x<<endl; return 0; } 该程序运行后的输出结果是A.20B.30C.10D.0
考题
若有以下程序:includeusing namespace Std;Class Base{public:Base(){x=0;}int x;};c
若有以下程序: #include<iostream> using namespace Std; Class Base {public: Base() {x=0;} int x;}; class Derivedl:virtua1 public Base {public: Derived1() {x=10;}}; class Derived2:virtual1 public Base {public: Derived2()A.20B.30C.10D.0
考题
有如下程序includeusing namespace std;class Base{protected:Base(){cout
有如下程序 #include<iostream> using namespace std; class Base{ protected: Base(){cout<<'A';} Base(char c){cout<<c;) }; class Derived: public Base{ public: Derived(char c){cout<<c;) }; int main(){ Derived dl('B'); return 0; } 执行这个程序屏幕上将显示输出( )。A.BB.BAC.ABD.BB
考题
下面程序的运行结果是( )。 #includeiostream.h class base{ protected: int a; public: base{cout”0”;} }; class basel:virtual base{ public: basel{cout”1”;} }; class base2:virtual base i public: base2{cout”2”;} }; class derived:public basel,public base2{ public: derived{cout”3”;} }; void main derived obj; coutendl:A.0123B.3120C.0312D.3012
考题
The lower-level classes (known as subclasses or derived classes) ( ) state and behavior from the higher-level class (known as a super class or base class).A.request B.inherit C.invoke D.accept
考题
下列程序的运行结果是______。 include class Base { public: virtual void func(int
下列程序的运行结果是______。include<iostream.h>class Base{public:virtual void func(int i){cout<<"class Base:"<<i<<end1;)};class Derived: public Base{public:void func(double d){cout<<"class Derived:"<<d<<endl;}};void main( ){Base a,*p=a;Derived b;p=b;(*p).func(3.3);}
考题
public class SomeException { } Class a: public class a { public void doSomething() { } } Class b: public class b extends a { public void doSomething() throws SomeException { } } Which is true about the two classes?() A、 Compilation of both classes will fail.B、 Compilation of both classes will succeed.C、 Compilation of class a will fail. Compilation of class b will succeed.D、 Compilation of class a will fail. Compilation of class a will succeed.
考题
Which two are true?()A、 An encapsulated, public class promotes re-use.B、 Classes that share the same interface are always tightly encapsulated.C、 An encapsulated class allows subclasses to overload methods, but does NOT allow overriding methods.D、 An encapsulated class allows a programmer to change an implementation without affecting outside code.
考题
Which methods from the String and StringBuffer classes modify the object on which they are called?() A、The charAt() method of the String class.B、The toUpperCase() method of the String class.C、The replace() method of the String class.D、The reverse() method of the StringBuffer class.E、The length() method of the StringBuffer class.
考题
In which two web application directories can dependent classes and libraries be located? ()A、 /WEB-INF/lib as a JAR fileB、 /META-INF/lib as a JAR fileC、 /classes as compiled class filesD、 /WEB-INF/lib as compiled class filesE、 /WEB-INF/classes as compiled class filesF、 /META-INF/classes as compiled class files
考题
单选题You are creating a Windows Forms Application by using the .NET Framework 3.5.You plan to design a new control that will be used on multiple forms in the app.You need to ensure that the control meets the following requirement: (1)It retrieves data from a MSSQL Server 2008 database instance. (2)It uses WPF classes to display data. (3)It uses user-customizable actions when the control is first painted on the form. What should you do?()A
Create a new custom class for the control that is derived from the Control class.B
Create a new custom class for the control that is derived from the UserControl class.C
Create a new custom class for the control that is derived from the ContentControl class.D
Create a new custom class for the control that is derived from the ContentPresenter class.
考题
单选题For which of the listed classes of fire combinations would carbon dioxide be most suitable as the extinguishing agent ().A
Class A and class BB
Class B and class CC
Class A and class CD
Class C, class D, and class E
考题
单选题public class SomeException { } Class a: public class a { public void doSomething() { } } Class b: public class b extends a { public void doSomething() throws SomeException { } } Which is true about the two classes?()A
Compilation of both classes will fail.B
Compilation of both classes will succeed.C
Compilation of class a will fail. Compilation of class b will succeed.D
Compilation of class a will fail. Compilation of class a will succeed.
考题
单选题Which methods from the String and StringBuffer classes modify the object on which they are called?()A
The charAt() method of the String class.B
The toUpperCase() method of the String class.C
The replace() method of the String class.D
The reverse() method of the StringBuffer class.E
The length() method of the StringBuffer class.
考题
多选题In which two web application directories can dependent classes and libraries be located? ()A/WEB-INF/lib as a JAR fileB/META-INF/lib as a JAR fileC/classes as compiled class filesD/WEB-INF/lib as compiled class filesE/WEB-INF/classes as compiled class filesF/META-INF/classes as compiled class files
热门标签
最新试卷