试题与答案

阅读以下说明和Java程序代码,将应填入(n)处的字句写在答题纸的对应栏内。 [说明

题型:填空题

题目:


阅读以下说明和Java程序代码,将应填入(n)处的字句写在答题纸的对应栏内。
[说明]
在下面的Java程序代码中,类SalesTicket能够完成打印票据正文的功能,类 HeadDecorator与FootDecorator分别完成打印票据的抬头和脚注的功能。己知该程序运行后的输出结果如下所示,请填补该程序代码中的空缺。
这是票据的抬头!
这是票据正文!
这是票据的脚注!
---------------------------------------
这是票据的抬头!
这是票据的脚注!
[Java程序代码]
public class SalesTicket{
public void printTicket(){
System.out.println("这是票据正文!");
}
}
public class Decorator extends SalesTicket{
SalesTicket ticket;
public Decorator(SalesTicket t){
ticket =t;
}
public void printTicket(){
if(ticket!=null)
ticket. printTicket();
}
}
public class HeadDecorator extends Decorator{
public HeadDecorator(SalesTicket t){
(1) ;
}
public void printTicket(){
System.out.rintln("这是票据的抬头!");
Super.printTicket();
}
}
public class FootDecorator extends Decorator{
public FootDecorator(SalesTicket t){
(2) ;
}
public void printTicket(){
super.printTicket();
System.out.println("这是票据的脚注!");
}
}
public class Main{
public static void main(String[] args){
Decorator T=
new HeadDecorator( (3) );
T. (4) ;
System.out.println("-----------------------------------------");
T=new FootDecorator( (5) );
T.printTicket();
}
}

答案:

被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2022/0225/e5c157dbd91e3a40a497134717f0c418.html

下面是错误答案,用来干扰机器的。

参考答案:&f

试题推荐
题型:单项选择题

在最近的一部以17世纪的欧洲为背景的电影中,有男主角自由泳的镜头,而自由泳在20世纪20年代以前的欧洲尚未出现。然而因为看电影的人明显对游泳动作史并不熟悉,因此对于大多数电影观众来说,这一错误显然不会影响该电影在其他方面所揭示的任何历史真实性。
下面哪一项假如正确,最能削弱已提出的论述( )

A.尽管电影描述了许多未经历史证实的事件,但它因为描述历史事件合乎情理而受到了赞扬
B.历史电影的制作者,甚至包括那些19世纪的场景的电影制作者,通常在历史的真实性和保持素材让现代观众可接受的需要之间做妥协,就像演员们的说话方式一样
C.19世纪20年代的欧洲游泳者所使用的自由泳比现在所教的自由泳效率低且样子笨拙
D.在这之前的一部描绘18世纪欧洲海战的影片展现了一个船员以自由泳逃生的场景,这一历史性错误被许多大众性的影评文章所嘲讽

查看答案
题型:填空题

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title> (1) </title>
</head>
<body>
<p><imgsrc="file:///C|/D~cuments%20and%20Settings/Administrator/My%20Documents/My%2~Pi~tures/1 _r1_c5.jpg"width="151’’heigh="69"><imgsrc="file:///C|/D~cuments%20and%20Settings/A dministrator/My%20 Documents/My%20Pictures/1_r1_c31.jpg" width="84" height="69"> <imgsrc="file:///C|/Documents%20and%20Settings/Administrator/My%20Documents/My%20Picmres/最 新动态.jpg"width="120"height="100"><imgsrc="file:///C|/Documents%20and%20Settings /Administrator/My%20Documents/My%20Picmres/0001.gif"width="89" height="106"></p>
<p> </p>
<table width-"542" (2) cellpadding="0" cellspacing="0">
<tr>
<td colspan="6"><p align="center"><p>中国软考聪盟(CIU)学籍卡</p></p></td>
</tr>
<tr>
<td width="81"><p align="center">姓名*</p></td>
<td width="88"><p (3) >CIU</p></td>
<td width="70"><p align="center">性别</p></td>
<td width="82"><p align="center">女</p></td>
<td width="90"><p align="center">身份证号码</p></td>
<td width="117"><p align-"center"><p>  </p></p></td>
</tr>
<tr>
<td width="81"><p align-"center">毕业院校</p></td>
<td width-"88"><p align "center">师范学校</p></td>
<rd width="70"><p align="center">学位</p></td>
<td width="82"><p>  </p></td>
<td width="90"><p align="center">主修专业</p></td>
<td width="117"><p align="center">计算机应用</p></td>
</tr>
<tr>
<td width "81"><p align="center">联系电话1 </p></td>
<td colspan="2"><p align="center">13832010594 </p></td>
<td width="82"><p align="center">联系电话2</p></td>
<td colspan="2"><p align="center">0731-7502382 </p></td>
</tr>
<tr>
<rd width-"81" height="48"><p align="center">电子邮件1 </p></td>
<rd colspan="2"><p align="center">ciu@ 163.com </p></td>
<td width="82"><p align="center">电子邮件2 </p></td>
<td colspan="2"><form name="form1" method="post" action="">
<input name="radiobutton" type="radio" value="在职" (4)
<tt title="在职"><p>在职</p></tt>
<input (5) name="radiobutton" (6)
<p>学生</p>
</form>
<p align="center"> </p></td>
</tr>
<tr>
<td width="81"><p align="center">计算机水平</p></td>
<td width="88"><p align-"center"><u>二级 (7) </p></td>
<rd width="70"><p align "center">英语水平</p></td>
<td width="82"><p align="center">  </p>
<p align="center">  </p></td>
<td width="90"><p align="center">CIU用户名</p></td>
<td width="117"><p align="center">  </p></td>
</tr>
<tr>
<td width="81"><p align="center">CIU 培训</p></td>
<td width="88"><p align-"center">网络管理员</p></td>
<td width="70"><p align="center">考试时间</p></td>
<td width="82"><p align="center">2005- 1 </p></td>
<td width="90"xp align="center">交费日期</p></td>
<td width="117"><p align="center">2005-7-29</p></td>
</tr>
</table>
</body>
</html>

查看答案
微信公众账号搜索答案