多选题You are building a dating web site. The client’s date of birth is collected along with lots of other information.The Person class has a derived method, getAge():int, which returns the person’s age calculated from thedate of birth and today’s date. In o

题目
多选题
You are building a dating web site. The client’s date of birth is collected along with lots of other information.The Person class has a derived method, getAge():int, which returns the person’s age calculated from thedate of birth and today’s date. In one of your JSPs you need to print a special message to clients within theage group of 25 through 35. Which two EL code snippets will return true for this condition? ()
A

${client.age in [25,35]}

B

${client.age between [25,35]}

C

${client.age between 25 and 35}

D

${client.age <= 35 && client.age >= 25}

E

${client.age le 35 and client.age ge 25}


相似考题
参考答案和解析
正确答案: B,E
解析: 暂无解析
更多“多选题You are building a dating web site. The client’s date of birth is collected along with lots of other information.The Person class has a derived method, getAge():int, which returns the person’s age calculated from thedate of birth and today’s date. In o”相关问题
  • 第1题:

    Given:Which method will complete this class?()

    A.public int compareTo(Object o){/*more code here*/}

    B.public int compareTo(Score other){/*more code here*/}

    C.public int compare(Score s1,Score s2){/*more code here*/}

    D.public int compare(Object o1,Object o2){/*more code here*/}


    参考答案:B

  • 第2题:

    下列程序中需要清理动态分配的数组,划线处应有的语句是_______。 include class pers

    下列程序中需要清理动态分配的数组,划线处应有的语句是_______。

    include<iostream.h>

    class person

    {

    int age,tall;

    public:

    person( ){age=0;tall=40;cout<<"A baby is born."<<endl;}

    person(int i){age=i;tall=40;cout<<"A old person."<<endl;}

    person(int i,int j){age=i;tall=j;cout<<"a old person with tall."<<endl;)

    ~person( ){cout<<"person dead."<<endl;}

    void show( )

    {

    cout<<"age="<<age<<",tall="<<tall<<endl;

    }

    };

    void main( )

    {

    person*ptr;

    ptr=new person[3];

    ptr[0]=person( );

    ptr[1]=person(18);

    ptr[2]=person(20,120);

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

    ptr[i].show( );

    ______

    }


    正确答案:delete[]ptr;
    delete[]ptr; 解析:本题考察对象数组的销毁方法,注意删除对象数组时,[]内不要指定大小。

  • 第3题:

    what’s your date of birth?


    正确答案:My date of birth is May 18th, 1990.

  • 第4题:

    Passage Five

    In America, every student in his or her second year of high school is required to take a class in driver's education.

    The course is divided up into two parts: class time for learning laws and regulations and driving time to practice driving. Each student is required to drive a total of six hours. The students are divided up into groups of four. The students and the instructor go out driving for two hour blocks of time. Thus, each student gets half an hour driving time per outing. Drivers Ed cars are unlike other cars in which they have two sets of brakes, one on the driver's side and one on the other side where the instructor sits. Thus, if the student driver should run into difficulties the instructor can take over.

    After a student has passed the driver's education course and reached the appropriate age to drive (this age differs in every state but in most cases the person must be 16 years old), he must take his driver's test. The person must pass all three tests in order to be given a driver's license. If the person does well in his or her driver's education class, he or she will pass the test with flying colors and get a driver's license.

    51. In America, the driver's course mentioned above______.

    A. is considered as part of the advanced education

    B. is given to anyone wanting to get a driver's license

    C. is carried on after students graduate from high school

    D. is offered to all the students of Grade 2 in high school


    正确答案:D

    51.答案为D  根据第一段every student in his or her second year of high school is required to take a class in driver's education可知高中二年级的学生必须修驾驶课。

  • 第5题:

    You are building a dating service web site. Part of the form to submit a client’s profile is a groupIIof radio buttons for the person’s hobbies: 20.Hiking 
    21.Skiing 
    22.SCUBA Diving 23. After the user submits this form, a confirmation screen is displayed with these hobbies listed. Assume thatan application-scoped variable, hobbies, holds a map between the Hobby enumerated type and the displayname. Which EL code snippet will display Nth element of the user’s selected hobbies?()

    • A、${hobbies[hobbyEnum[N]}
    • B、${hobbies[paramValues.hobbyEnum[N]]}
    • C、${hobbies[paramValues@’hobbyEnum’@N]}
    • D、${hobbies.get(paramValues.hobbyEnum[N])}
    • E、${hobbies[paramValues.hobbyEnum.get(N)]}

    正确答案:B

  • 第6题:

    A user attempts to login to a bookmarked site but is prompted for their social security number,mother’s maiden name and date of birth. Which of the following has MOST likely happened?()

    • A、The website has updated the security policies.
    • B、The user’s identity has been stolen.
    • C、The browser has been hijacked.
    • D、The user typed the website address incorrectly.

    正确答案:C

  • 第7题:

    You are building a dating web site. The client’s date of birth is collected along with lots of other information.The Person class has a derived method, getAge():int, which returns the person’s age calculated from thedate of birth and today’s date. In one of your JSPs you need to print a special message to clients within theage group of 25 through 35. Which two EL code snippets will return true for this condition? ()

    • A、${client.age in [25,35]}
    • B、${client.age between [25,35]}
    • C、${client.age between 25 and 35}
    • D、${client.age <= 35 && client.age >= 25}
    • E、${client.age le 35 and client.age ge 25}

    正确答案:D,E

  • 第8题:

    You are implementing an ASP.NET application. The application includes a Person class with property Age. You add a page in which you get a list of Person objects and display the objects in a GridView control. You need to add code so that the GridView row is highlighted in red if the age of the person is less than 18. Which GridView event should you handle?()

    • A、RowDataBound
    • B、RowCommand
    • C、RowUpdated
    • D、RowEditing

    正确答案:A

  • 第9题:

    单选题
    A user attempts to login to a bookmarked site but is prompted for their social security number,mother’s maiden name and date of birth. Which of the following has MOST likely happened?()
    A

    The website has updated the security policies.

    B

    The user’s identity has been stolen.

    C

    The browser has been hijacked.

    D

    The user typed the website address incorrectly.


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

  • 第10题:

    问答题
    While some people claim that a person's essential qualities are inherited at birth, others hold that the circumstances in which a person grows up are mainly responsible for the type of person he/ she later becomes. Write a composition of 400 words on the following topic, expressing your views

    正确答案:
    ESSENTIAL QUALITIES: INHERITED OR NOT? Generally, opinions differ with regard to the formation of people's essential qualities. Some people claim that a person's essential qualities are inherited; others hold that the circumstances in which a person grows up are mainly responsible for the type of person he later becomes. These two kinds of opinions, to a certain degree, are equally reasonable. Personally I think circumstances are more important than inherited characteristics for the following reasons.
    True, inherited characteristics play an important role in the formation of one's essential qualities. Cases abound in which children are exactly like their parents in many aspects. The role inherited characteristics play should not be denied. Otherwise, how could we explain the proverb like father, like son? But the son of a criminal may not be a criminal like his father. He might become a scholar of respectable moral integrity. And the son of a scholar might end up as a criminal, not a scholar. In many cases, the circumstances in which a person grows up are responsible for the type of person he later becomes. If inherited characteristics were the overriding factor in shaping a person's essential qualities, then the sons of the great Chinese poets Li Po and Du Fu would also be great poets, and the sons of great scientists would be great scientists.
    What is more, even the same person, having experienced the ups and downs of life, would change dramatically in his essential qualities. For instance, a college student, having experienced the agonies of his parents' decade-long separation or divorce, grows up from a carefree boy to a taciturn adult. Indifferent to things around him, he may hold a negative attitude toward people and society. On the contrary, if he is lucky enough to have a happy family, and there is no other worries and troubles, he will most possibly live a happy life as before. In his case, circumstances are the most powerful shaping force in the formation of his essential qualities.
    To be honest, it is not easy to reach a final conclusion about this question, because the formation of one's essential qualities is a highly complex matter. There is no denying that one's essential qualities are inherited to a large extent. But, based on the above instances, I may well say that circumstances play a bigger role in shaping a person's essential quality.
    解析:
    从文章第一段结尾可知,作者认为环境比先天因素更能影响人的成长。第二段通过举例证明先天因素不起决定性作用。第三段通过对比法来说明环境对人的巨大影响。结尾段重申论点。

  • 第11题:

    单选题
    有如下定义:struct{  int num;  char name[10];  struct {  int y;  int m;  int d; }birth; }s,*ps=&s;以下对内嵌结构体成员的引用形式错误的是(  )。
    A

    ps.birth.y

    B

    s.birth.y

    C

    ps->birth.y

    D

    (*ps).birth.y


    正确答案: C
    解析:
    使用结构体指针对结构体成员进行访问时,形式为:结构指针名->结构成员名,或者(*结构指针名).结构成员名,题目中ps为结构体指针,答案选择A选项。

  • 第12题:

    多选题
    You are building a dating web site. The client’s date of birth is collected along with lots of other information.The Person class has a derived method, getAge():int, which returns the person’s age calculated from thedate of birth and today’s date. In one of your JSPs you need to print a special message to clients within theage group of 25 through 35. Which two EL code snippets will return true for this condition? ()
    A

    ${client.age in [25,35]}

    B

    ${client.age between [25,35]}

    C

    ${client.age between 25 and 35}

    D

    ${client.age <= 35 && client.age >= 25}

    E

    ${client.age le 35 and client.age ge 25}


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

  • 第13题:

    根据下面的程序,可以在主程序中使用的合法语句是( )。 include using namesp

    根据下面的程序,可以在主程序中使用的合法语句是( )。 #include <iostream> using namespace std; class Person{ int age; public: void SetAge(int x){age=x;} void ShowAge(){cout<<"the Person's age is" <<age;} }; class Student:private Person{ public:int study_code; }; void main(){ Student wangqiang; wangqiang.study_code=23; }

    A.wangqiang.age=231

    B.wangqiang.Setage(23)

    C.wangqiang.ShowAge()

    D.wangqiang.study_code=12


    正确答案:D
    解析:由于是私有继承,基类中所有成员成为派生类中的私有成员,故不能由派生类的对象访问,只有派生类的公有成员可由派生类对象访问。

  • 第14题:

    给出下面不完整的类代码,则横线处的语句应该为( )。 class Person { String name,department; int age; public Person (Strings) {name=s;} public Person (String s,int

    A.{name=s;age=a;} public Person (String n,String d,intA){ __________ department=d; } }A)Person (n,A);

    B.this (Person(n,A));

    C.this(n,A);

    D.this(name,age);


    正确答案:C
    解析:本题主要考查在同一个类的不同构造方法中调用该类的其他构造方法需要使用 this(…)的形式,而且必须是在构造方法的第一行调用。这个和普通方法重载调用的方式不同,普通方法可以直接使用方法名加参数来调用,而且调用位置没有限制,因此选项A是不行的,选项B的语法就是错误的,选项D的错误在于在父类型的构造方法被调用前不能引用类的成员。构造方法是一个类对象实例化的开始,因此在构造方法中不能将成员作为参数引用。

  • 第15题:

    根据下面的程序,可以在主程序中使用的合法语句是( )。 include using namespa

    根据下面的程序,可以在主程序中使用的合法语句是( )。 #include <iostream> using namespace std; class Person{ int age; voidtest(){} public: Person(intage){this->age=age;} void ShowAge(){cout<<"the Person's age is",<<age;} }; void main(){ Person wang(23); }

    A.wang.age=45

    B.wang.wang(45)

    C.wang.ShowAge()

    D.wang.test()


    正确答案:C
    解析:ShowAse是类的公有成员,可以由对象访问,其他的为私有成员,类对象不能访问。

  • 第16题:

    public class Person {  private String name, comment;  private int age;  public Person(String n, int a, String c) {  name = n; age = a; comment = c;  }  public boolean equals(Object o) {  if(! (o instanceof Person)) return false;  Person p = (Person)o;  return age == p.age && name.equals(p.name);  }  }  What is the appropriate definition of the hashCode method in class Person?() 

    • A、 return super.hashCode();
    • B、 return name.hashCode() + age * 7;
    • C、 return name.hashCode() + comment.hashCode() /2;
    • D、 return name.hashCode() + comment.hashCode() / 2 - age * 3;

    正确答案:B

  • 第17题:

    You are building a dating web site. The client’s date of birth is collected along with lots of other information.You have created an EL function with the signature: calcAge(java.util.Date):int and it is assigned to the name, age, in the namespace, funct. In one of your JSPsyou need to print a special message to clients who are younger than 25.  Which EL code snippet will returntrue for this condition?()

    • A、${calcAge(client.birthDate) < 25}
    • B、${calcAge[client.birthDate] < 25}
    • C、${funct:age(client.birthDate) < 25}
    • D、${funct:age[client.birthDate] < 25}
    • E、${funct:calcAge(client.birthDate) < 25}

    正确答案:C

  • 第18题:

    Given the uncompleted code of a class:     class Person {  String name, department;     int age;  public Person(String n){  name = n; }  public Person(String n, int a){  name = n;  age = a;  }  public Person(String n, String d, int a) {  // doing the same as two arguments version of constructor     // including assignment name=n,age=a    department = d;     }     }  Which expression can be added at the "doing the same as..." part of the constructor?() 

    • A、 Person(n,a);
    • B、 this(Person(n,a));
    • C、 this(n,a);
    • D、 this(name,age);

    正确答案:C

  • 第19题:

    You are developing a Web application to display products. Products are displayed on different pages on your Web site. You want to create a user control to manage the display of products. You need a default visual implementation of the UI of the user control. In addition, you need to provide developers with the flexibility to change the layout and controls of the UI. Which three actions should you perform? ()

    • A、Apply the TemplateContainerAttribute to a property of type ITemplate. Pass the type of the template's naming container as the argument to the attribute.
    • B、Apply the TemplateContainerAttribute to the user control's class declaration.
    • C、Implement a property of type INamingContainer in the user control's code-behind class.
    • D、Implement a property of type ITemplate in the user control's code-behind class.
    • E、Define a new class that inherits from the ITemplate interface. Implement the InstantiateIn method of the ITemplate interface.

    正确答案:A,D,E

  • 第20题:

    多选题
    You are developing a Web application to display products. Products are displayed on different pages on your Web site. You want to create a user control to manage the display of products. You need a default visual implementation of the UI of the user control. In addition, you need to provide developers with the flexibility to change the layout and controls of the UI. Which three actions should you perform?()
    A

    Apply the TemplateContainerAttribute to a property of type ITemplate. Pass the type of the template's naming container as the argument to the attribute.

    B

    Apply the TemplateContainerAttribute to the user control's class declaration.

    C

    Implement a property of type INamingContainer in the user control's code-behind class.

    D

    Implement a property of type ITemplate in the user control's code-behind class.

    E

    Define a new class that inherits from the ITemplate interface. Implement the InstantiateIn method of the ITemplate interface.


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

  • 第21题:

    单选题
    You are building a dating web site. The client’s date of birth is collected along with lots of other information.You have created an EL function with the signature: calcAge(java.util.Date):int and it is assigned to the name, age, in the namespace, funct. In one of your JSPsyou need to print a special message to clients who are younger than 25.  Which EL code snippet will returntrue for this condition?()
    A

    ${calcAge(client.birthDate) < 25}

    B

    ${calcAge[client.birthDate] < 25}

    C

    ${funct:age(client.birthDate) < 25}

    D

    ${funct:age[client.birthDate] < 25}

    E

    ${funct:calcAge(client.birthDate) < 25}


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

  • 第22题:

    单选题
    According to the writer, which of the following is not true about your boss?
    A

    He is the person who supervises you.

    B

    He is the person setting the company’s goals.

    C

    He can keep you informed of company direction concerned with your future.

    D

    He can help you acquire support or cooperation from other departments.


    正确答案: B
    解析:
    第二段原文是“He/she is privy to the company’s goals”,是说“你的老板会参与涉及到公司目标的制定”,文章并没有说是你的老板一个人设定了公司目标,故选项B错误。

  • 第23题:

    多选题
    Which two prevent a servlet from handling requests.?()
    A

    The servlet’s init method returns a non-zero status.

    B

    The servlet’s init method throws a Servlet Exception

    C

    The servlet’s init method sets the Servlet Response’s context length to 0

    D

    The servlet’s init method sets the Servlet Response’s content type to null.

    E

    The servlet’s init method does NOT return within a time period defined by the servlet container.


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

  • 第24题:

    单选题
    public class Person {  private String name, comment;  private int age;  public Person(String n, int a, String c) {  name = n; age = a; comment = c;  }  public boolean equals(Object o) {  if(! (o instanceof Person)) return false;  Person p = (Person)o;  return age == p.age && name.equals(p.name);  }  }  What is the appropriate definition of the hashCode method in class Person?()
    A

     return super.hashCode();

    B

     return name.hashCode() + age * 7;

    C

     return name.hashCode() + comment.hashCode() /2;

    D

     return name.hashCode() + comment.hashCode() / 2 - age * 3;


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