假定一个表单里有一个文本框Textl和一个命令按钮组CommandGroupl。命令按钮组是一个容器对象,其中包含Commandl和Command2两个命令按钮。如果要在Cornmandl命令按钮的某个方法中访问文本框的Value属性值,正确的表达式是( )。
A:This.ThisForm.Textl.Value B:This.Parent.Parent.Textl.Value C:Parent.Parent.Textl.Value D:This.Parent.Textl.Value
假设一个表单里有一个文本框Text1和一个命令按钮组CommandGroup1,命令按钮组中包含Command1和Command2;两个命令按钮。如果要在Command1命令按钮的某个方法中访问文本框的Value属性值,下列式子中,正确的是
A:ThisForm.Text1.Value B:ThisForm.Parent.Value C:Parent.Text1.Value D:This.Parent.Text1.Value
下列代码的输出结果是( )。 class parent void printme( ) System.out.println("parent"); class child extends parent void printme( ) System. out.println("child"); void printall( ) super, printme( ); this.printme( ); printme( ); public class test public static void main(String args[]) child myc=new child( ); myc.printall( );
A:parent child child B:parent child parent C. parent child D. 编译错误
下列程序的运行结果为( )。
#include<iostream.h>
class Location {
protected:
int X,Y;
publiC://
void SeX(int myx){X=myx;}
void SetY(int myy){Y=myy;}
void showxy( ) {cout<<"X=" <<X<<" " <<"Y"=<< Y<<
endl;} };
Class Rectangle :public Location{
private:
int H,W;
public:
void SetH(int myh){H=myh;}
void SetW(int myw) {W=myw;}
void show( ) {cout <<"X="<<X<<" "<<"Y="<<"<<
Y<<" "<<"H="<< H<<" " <<"W=" <<W
<<endl;} };
void main( )
{ Rectangle r1;
r1.SetX(3);
r1.SetY(5);
r1.SetH(4);
r1.SetW(6);
r1.showxy( );
r1. show( );}
A:ThisForm.Text1.Value B:ThisForm.Parent.Value C:Parent.Text1.Value D:This.Parent.Text1.Value
下列代码的输出结果是( )。
class parent
{
void printme( )
{
System.out.println("parent");
}
}
class child extends parent
{
void printme( )
{
System. out.println("child");
}
void printall( )
{
super, printme( );
this.printme( );
printme( );
}
}
public class test
{
public static void main(String args[])
{
child myc=new child( );
myc.printall( );
}
}
A:parent
child
child B:parent
child
parent
C. parent
child
D. 编译错误
下列程序的运行结果为( )。
#include<iostream.h>
class Location {
protected:
int X,Y;
publiC://
void SeX(int myx){X=myx;}
void SetY(int myy){Y=myy;}
void showxy( ) {cout<<"X=" <<X<<" " <<"Y"=<< Y<<
endl;} };
Class Rectangle :public Location{
private:
int H,W;
public:
void SetH(int myh){H=myh;}
void SetW(int myw) {W=myw;}
void show( ) {cout <<"X="<<X<<" "<<"Y="<<"<<
Y<<" "<<"H="<< H<<" " <<"W=" <<W
<<endl;} };
void main( )
{ Rectangle r1;
r1.SetX(3);
r1.SetY(5);
r1.SetH(4);
r1.SetW(6);
r1.showxy( );
r1. show( );}
A:ThisForm.Text1.Value B:ThisForm.Parent.Value C:Parent.Text1.Value D:This.Parent.Text1.Value
下列程序的运行结果为( )。
#include<iostream.h>
class Location {
protected:
int X,Y;
publiC://
void SeX(int myx){X=myx;}
void SetY(int myy){Y=myy;}
void showxy( ) {cout<<"X=" <<X<<" " <<"Y"=<< Y<<
endl;} };
Class Rectangle :public Location{
private:
int H,W;
public:
void SetH(int myh){H=myh;}
void SetW(int myw) {W=myw;}
void show( ) {cout <<"X="<<X<<" "<<"Y="<<"<<
Y<<" "<<"H="<< H<<" " <<"W=" <<W
<<endl;} };
void main( )
{ Rectangle r1;
r1.SetX(3);
r1.SetY(5);
r1.SetH(4);
r1.SetW(6);
r1.showxy( );
r1. show( );}
A:ThisForm.Text1.Value B:ThisForm.Parent.Value C:Parent.Text1.Value D:This.Parent.Text1.Value