更多“Public choice公共选择”相关问题
  • 第1题:

    请完成下列Java程序:创建一个具有2行3列的GridLayout管理器,包括Choice、Label、Button构件,布局为第1行包括一个Choice构件(包括2个选项item1和item2)、一个Label构件(当选择Choice构件中的选项时,Labe1构件显示相应的名称,即如果点击item1则Labe1中显示item1)和一个exit按钮(点击则退出应用程序),第2行包括3个Button构件。程序运行结果如下。

    注意:请勿改动main()主方法和其他已有语句内容,仅在下划线处填入适当的语句。

    源程序文件清单如下:

    import java.awt.*;

    import java.awt.event.*;

    public class ex11_2 extends Frame. implements ActionListener, ItemListener

    {

    private Label 1;

    private String str="label";

    private Choice choice11_2;

    public static void main(String[] arg)

    {

    new ex11_2();

    }

    ex11_2 ()

    {

    setLayout (______);

    choice11_2 = new Choice();

    choice11_2.addItem("item1");

    choice11_2.addItem("item2");choice11_2.______;

    add(choice11_2);

    l=new Label(str);

    add(l);

    Button exit11_2 = new Button("exit");

    exit11_2.addActionListener(this);

    add(exit11_2);

    for(int i=0; i<3; i++)

    add(new Button("button" + i));

    setSize(300,300);

    pack();

    show();

    }

    public void actionPerformed(ActionEvent event)

    {

    if (event.getActionCommand ( ). equals ( "exit" ) )

    {

    System.exit(0);

    }

    }

    public void itemStateChanged(ItemEvent event

    {

    str=choice11_2.getSelectedItem();

    l.setText(str);

    }

    }


    正确答案:new GridLayout(23) addItemListener(this)
    new GridLayout(2,3) addItemListener(this) 解析:本题主要考查Java常用构件Choice和高级事件ItemEvent以及GridLayout布局管理器的用法。解题关键是熟悉GridLayout布局管理器和ItemEvent的用法。在本题中,ItemEvent在教材中并没有给出确切的用法,但是可以根据ActionEvent的addActionEvent()方法和重载actionPerformed()方法来完成对动作事件监听的用法来类推出ItemEvent事件的监听方法,这里要求有根据已有知识进行举一反三的能力。

  • 第2题:

    在MIDP中,代表List为多选方式的常数标识符是()

    A. Choice, MULTIPLE

    B. Choice, IMPLICIT

    C.Choice. EXCLUSIVE

    D.Choice.POPUP


    参考答案A

  • 第3题:

    收到;接受;选择(  )。
    A.receive;accept;choice
    B.receive;choice;accept
    C.accept:receive;choice
    D.accept;choice;receive


    答案:A
    解析:

  • 第4题:

    在Java语言中,下列组件可以让用户选择多个选项有()。

    • A、Checkbox
    • B、Radiobutton
    • C、List
    • D、Choice

    正确答案:A,C

  • 第5题:

    行政管理是英文()一词的汉译,传统上亦称公共行政或公共行政管理。

    • A、public management
    • B、public administrator
    • C、public administration
    • D、administrative management

    正确答案:C

  • 第6题:

    逆向选择(Adverse choice)


    正确答案: 在此状况下,保险公司发现它们的客户中有太大的一部分来自高风险群体。

  • 第7题:

    选择反应时(choice reaction time)


    正确答案: 是根据不同的刺激物在各种可能性中选择一种符合要求的反应。

  • 第8题:

    “公共关系”这个词是由英文()翻译过来的,简称“PR”。

    • A、 Public Relation
    • B、 Public Relations
    • C、 Public Relative
    • D、 Public Relational

    正确答案:B

  • 第9题:

    公共关系的英文是()。

    • A、Public Relations
    • B、Public Relation
    • C、Publication Relations
    • D、Publication Relation

    正确答案:A

  • 第10题:

    名词解释题
    选择反应时(choice reaction time)

    正确答案: 是根据不同的刺激物在各种可能性中选择一种符合要求的反应。
    解析: 暂无解析

  • 第11题:

    名词解释题
    公共物品(Public good)

    正确答案: 公共物品是指非竞争性和非排他性的物品。所谓非竞争性,意指为另一个消费者提供这一物品所带来的边际成本为零。所谓非排他性,意指不能排除其他人消费这一物品(不论他们是否付费)。
    解析: 暂无解析

  • 第12题:

    单选题
    Refer to the exhibit. Available public Internet sites are sometimes used for estimating performance. Which statement regarding their use for estimating VPN performance is correct?()
    A

    Throughput results are valid as a value from the Teleworker's home to the corporate site, regardless of the location of the public test server. 

    B

    Throughput results may not be valid due to the public server's location on the Internet and fluctuations based on the use of the public server. 

    C

    Throughput values are not affected by the choice of split tunneling or Internet access through the VPN. 

    D

    Throughput results are unrelated to the Teleworker PC configuration or current PC use.


    正确答案: C
    解析: 暂无解析

  • 第13题:

    下列组件中没有选择项的是( )。

    A.Button

    B.CheckBox

    C.List

    D.Choice


    正确答案:A
    解析:本题考查Java中常用组件的基本知识。选项A正确,Button组件是按钮,只能响应点击,组件上没有提供选择项;选项B错误,CheckBox组件为复选框,当然可以有多项选择项:选项C错误,List组件为列表框支持滚动条,可以有多项选择项;选项D错误,Choice组件为选择框,可弹出菜单提供多项选择。故本题答案是A。

  • 第14题:

    本题的功能是对下拉菜单项的操作,包括添加和删除。页面包括一个下拉菜单、一个文本框和两个按钮“删除”和“添加”,选中下拉菜单的一项后,可以通过“删除”按钮从下拉菜单中删除该项,在文本框中填入字符串后,单击“添加”按钮就可以将该项添加到下拉菜单中,所有信息都将显示在右侧的文本域中。

    import java.awt.*;

    import java.awt.event.*;

    public class java2 extends java.applet.Applet imple-

    ments hemListener,ActionListener

    {Choice choice;

    TextField text;

    TextArea area;

    Button add,del;

    public void init() .

    {choice:new Choice();

    text=new TextField(8);

    area:new TextArea(6,15);

    choice.add("音乐天地");

    choice.add("武术天地");

    choice.add("象棋乐园");

    choice.add("交友聊天");

    add=new Button("添加");

    del=new Button("删除");

    add.addActionListener(this);

    del.addActionListener(this);

    choice.addItemListener(this);

    add(choice);

    add(del);add(text);add(add);add(area);

    }

    public void itemStateChanged(hemEvent e)

    {String name= ;

    int index=choice.getSelectedIndex();

    area.setText("\n"+index+":"+name);

    }

    public void actionPerformed(ActionEvent e)

    {if(e.getSource()= =add||e.getSource()= =

    text)

    {String name=text.getText();

    if(name.length()>;0)

    {choice.add(name);

    choice.select(name);

    area.append("\n添加"+name);

    }

    }

    else if(e.getSource()= =del)

    {choice.remove( );

    area.append("\n删除"+choice.getSelectedItem

    ());

    }

    }

    }


    正确答案:
    第1处:choice.getSelectedltem()第2处:choice.getSelectedIndex()【解析】第1处是获取当前选中项的数据;第2处清除选中项的索引号。

  • 第15题:

    在《正义论》中,public goods可被翻译为公共益品。


    正确答案:正确

  • 第16题:

    公共关系的英文是()。

    • A、public relations         
    • B、public relation
    • C、publication relations 
    • D、publication relation

    正确答案:A

  • 第17题:

    Public good 公共品


    正确答案: 指这样一种商品,其效用不可分割地影响整个公众,而不管其中任何个人是否愿意消费。例如,一项根除天花的保健措施对所有人都起了保护作用,而决不只是那些付钱接种疫苗的人。而私人品,如面包,如果被一个人消费,就不可能被另外的人消费。

  • 第18题:

    公共场所()

    • A、place
    • B、common place
    • C、private place
    • D、public place

    正确答案:D

  • 第19题:

    公共关系的英文是()

    • A、Public Relations
    • B、Public Relation
    • C、Publication Relations

    正确答案:A

  • 第20题:

    interface Animal {  void soundOff();  }  class Elephant implements Animal {  public void soundOff() {  System.out.println(“Trumpet”);  }  }  class Lion implements Animal {  public void soundOff() { System.out.println(“Roar”);  }  }  class Alpha1 {  static Animal get( String choice ) {  if ( choice.equalsIgnoreCase( “meat eater” )) {  return new Lion();  } else {  return new Elephant();  }  }  }  Which compiles?()  

    • A、 new Animal().soundOff();
    • B、 Elephant e = new Alpha1();
    • C、 Lion 1 = Alpha.get(“meat eater”);
    • D、 new Alpha1().get(“veggie”).soundOff();

    正确答案:D

  • 第21题:

    西方“公共”(public)一词有多重涵义,主要包含()。

    • A、公共的
    • B、公有的
    • C、公用的
    • D、公开的

    正确答案:A,B,C,D

  • 第22题:

    单选题
    interface Animal {  void soundOff();  }  class Elephant implements Animal {  public void soundOff() {  System.out.println(“Trumpet”);  }  }  class Lion implements Animal {  public void soundOff() { System.out.println(“Roar”);  }  }  class Alpha1 {  static Animal get( String choice ) {  if ( choice.equalsIgnoreCase( “meat eater” )) {  return new Lion();  } else {  return new Elephant();  }  }  }  Which compiles?()
    A

     new Animal().soundOff();

    B

     Elephant e = new Alpha1();

    C

     Lion 1 = Alpha.get(“meat eater”);

    D

     new Alpha1().get(“veggie”).soundOff();


    正确答案: B
    解析: 暂无解析

  • 第23题:

    单选题
    From this text we learn that it is ______.
    A

    harder to make a choice between public and private schools

    B

    harder to go to private schools this year than before

    C

    more difficult to go to public schools than to private schools

    D

    as difficult to go to private schools this year as before


    正确答案: D
    解析:
    细节题。由全文第一句可知,进入国内一流私立学校的竞争一向很激烈,但今年伊莉莎白发现这种状况又升级了。即今年进入私立学校比往年更难,故B项为正确答案。该句中的tough对应选项中的hard,而reach a new level则对应选项中所用的比较级。