根据下面所给的AAA数据库,按照下列每种功能写出相应的Transact-SQL语句或程序段 假设使用名称为AAA的数据库,它包括Students(学号char(8),姓名varchar(8),年龄int,专业varchar(20),入学日期DateTime)和Score(学号char(8),课程名varchar(10),成绩numeric(5,2))两张表。 创建Students表。
第1题:
写出下面消息对应的方法编号(如果该消息错误或者没有对应的方法调用,请填写“无”)
tr.perimeter( )
第2题:
参考答案:Internet plays an important role in our life.First, The world gets smaller and communication becomes easier and faster, because through the Internet we can get to know people from all over the world.Besides, we can work at home by sending email and accessing online information.Finally, online shopping makes our life more convenient.But as many other modern inventions, Internet has its problems.For instance, there is too much junk information on the net, and it wastes our time.Even worse, some evil persons commit crimes using the Internet technology.Thousands of people have fallen in love with the Internet.It’s necessary to adopt stricter administration measures so that it will serve us better.
第3题:
抄写下面的句子,并根据拼音写出相应的汉字。(2分)
仰望天穹,让心飞上云duān。
第4题:
请写出一条修改数据库定义的语句,将AAA数据库的初始大小更改为5MB,最大空间限定为10MB。
第5题:
第6题:
不考虑内存释放问题,下列赋值语句中哪两个是合法的(写出合法赋值语句的编号)
①sq=sh;②sh=tr;③tr=sq;④sq=tr;⑤sh=sq。
第7题:
参考答案:Television has both advantages and disadvantages to us.On the one hand, it can make us informed of daily news, let us know the outside world, provide lessons for the learners, and can even bring joy toour lives as well.
On the other hand, some television programs have been extremely harmful to the young.A case in point is the movies with violent scenes.Watching TV too long can do harm to our body and it’s a great distraction for us to work.
So young people should learn to get ride of the bad influences of TV and learn to make use of the advantages that TV can bring us.
第8题:
根据下列句子的意思及所给的汉语提示,写出空缺处单词、固定短语或固定搭配的正确形式。
81. This is our _____________________ (三) time to plant trees.
第9题:
下列赋值语句中哪两个是合法的(写出合法赋值语句的编号)。
①sq=sh; ②sh=tr; ③tr=sq; ④sq=tr; ⑤sh=sq;
第10题:
试题七(共 15 分)
阅读下列说明、图和Java 代码,回答问题1 至问题3,将解答写在答题纸的对应栏内。
[说明]
已知四个类之间的关系如图 7-1 所示,分别对每个类的方法进行编号,例如 Shape的 perimeter()为 1 号,表示为“1:perimeter()” ,Rectangle 类的 perimeter()为 2 号,表示为“2:perimeter()” ,依此类推,其中,每个类的 perimeter方法签名相同。
[Java 代码]
Triangle tr = new Triangle();
Square sq = new Square();
Shape sh = tr;
[问题 1] 关于上述 Java代码中 sh 和 tr 的以下叙述中,哪两个是正确的(写出编号) 。
① sh 和 tr 分别引用同一个对象;
② sh 和 tr 分别引用同一类型的不同的对象;
③ sh 和 tr 分别引用不同类型的不同对象;
④ sh 和 tr 分别引用同一个对象的不同拷贝;
⑤ sh 和 tr 所引用的内存空间是相同的。
[问题 2] 写出下面消息对应的方法编号(如果该消息错误或者没有对应的方法调用,请
填写“无” ) 。
tr.height() (1)
sh.perimeter() (2)
sq.height() (3)
sq.perimeter() (4)
sh.height() (5)
tr.perimeter() (6)
[问题 3] 下列赋值语句中哪两个是合法的(写出合法赋值语句的编号) 。
① sq = sh; ② sh = tr; ③ tr = sq; ④ sq = tr; ⑤ sh = sq;