A UNIX user named Bob wants to replace his chess program with a new one, but he is hot sure where the old one is installed. Bob is currently able to run a Java chess program starting from his home directory /home/bob using the command: java -classpath /test:/home/bob/downloads/* .jar games.Chess Bob‟s CLASSPATH is set (at login time) to: /usr/lib:/home/bob/classes:/opt/java/lib:/opt/java/lib/* .jar What is a possible location for the Chess.class file?()
第1题:
阅读下列说明和C++代码,填补代码中的空缺,将解答填入答题纸的对应栏内。 【说明】 ‘ 以下C++代码实现一个简单的聊天室系统(ChatRoomSystem),多个用户(User)可以向聊天室(ChatRoom)发送消息,聊天室将消息展示给所有用户。类图如图6-1所表示。图6-1 类图
【C++代码】 include<iostream> include <string> using namespace std; class User { private: string name; public: User(string name){ (1) =name; } ~User(){} void setName(string name) { this->name=name; } string getName(){ return name; } void sendMessage(string message); }; class ChatRoom { . public: static void showMessage(User* user, string message) { cout<<"["<<user->getName()<<"] : "<<message<<endl; } }; void User::sendMessage(string message) { (2) (this,message); } class ChatRoomSystem{ public: . . void startup() { User* zhang = new User(“John"); User* li = new User("Leo"); zhang->sendMessage("Hi! Leo!"); li_>sendMessage("Hi! John!"); } void join(User* user) { (3) ("HeIIo Everyone! l am"+user->getName()); } . }; int main(){ ChatRoomSystem*crs= (4) ; crs->startup(); crs->join( (5) ("Wayne")); delete crs; } /* 程序运行结果: [John]:Hi! Leo! [Leo]:Hi! John! [Wayne]:Hello Everyone! I am Wayne /*
第2题:
第3题:
现有两张数据表(MySQL数据库)如下:
x_pt_info x_user_info
字段 类型 长度 小数位 字段 类型 长度 小数位
user_id int 11 user_id int 11
pt_group int 11 user_name varchar 20
pt_number decimal 10 2 user_work int 1
描述一下这个SQL语句的作用:
SELECT b.user_id as user_id,b.user_name as user_name,round(sum(a.pt_number),2) as ptnum from x_pt_info a,x_user_info b where
a.user_id=b.user_id and a.pt_group=1 and b.user_work=2 group by a.user_id order by ptnum desc
另外,就你的经验,你觉得该语句是否有改进的余地,如有,请阐述。
第4题:
如果想要在JSP中使用user包中的User类,则以下写法正确的是()。
第5题:
Unix中用于存贮用户信息的文件是()。
第6题:
A.InsertIntousers(id,user_namE.Valuee(100,"luhong")提示:id字段类型自动编号,因此,用户不能赋值
B.InsertIntousers(real_name,tel)Valuee("卢红","6545632")提示:user_name是主键必须赋值,但未赋值。
C.InsertIntousers(user_name,Email)Valuee("luhong","")提示:Email不是必填字段,但应该赋NULL值
D.InsertIntousers(user_name,Email)Valuee("luhong",NULL)
第7题:
第8题:
A.UNIX shell
B.user level CLI
C.configuration mode
D.operational mode
第9题:
Given a web application in which the cookie userName is expected to contain the name of the user. Which EL expression evaluates to that user name?()
第10题:
在JSP中要使用user包中的User类,则以写法正确的是()。