![2015年电大JAVA语言与面向对象程序设计专科期末复习试题及答案小抄_第1页](http://file.renrendoc.com/FileRoot1/2015-1/18/9da807c3-0bca-4644-bc3e-a1a5aa467c3b/9da807c3-0bca-4644-bc3e-a1a5aa467c3b1.gif)
![2015年电大JAVA语言与面向对象程序设计专科期末复习试题及答案小抄_第2页](http://file.renrendoc.com/FileRoot1/2015-1/18/9da807c3-0bca-4644-bc3e-a1a5aa467c3b/9da807c3-0bca-4644-bc3e-a1a5aa467c3b2.gif)
![2015年电大JAVA语言与面向对象程序设计专科期末复习试题及答案小抄_第3页](http://file.renrendoc.com/FileRoot1/2015-1/18/9da807c3-0bca-4644-bc3e-a1a5aa467c3b/9da807c3-0bca-4644-bc3e-a1a5aa467c3b3.gif)
![2015年电大JAVA语言与面向对象程序设计专科期末复习试题及答案小抄_第4页](http://file.renrendoc.com/FileRoot1/2015-1/18/9da807c3-0bca-4644-bc3e-a1a5aa467c3b/9da807c3-0bca-4644-bc3e-a1a5aa467c3b4.gif)
![2015年电大JAVA语言与面向对象程序设计专科期末复习试题及答案小抄_第5页](http://file.renrendoc.com/FileRoot1/2015-1/18/9da807c3-0bca-4644-bc3e-a1a5aa467c3b/9da807c3-0bca-4644-bc3e-a1a5aa467c3b5.gif)
已阅读5页,还剩2页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
电大 JAVA 语言与面向对象程序设计 期末复习试题及答案小抄 一、单选择题 (每小题 2 分,共 30 分 ) 1、编译 Java Application 源程序文件将产生相应的字节码文件,这些字节码文件的扩展名为 ( )。 (A) java (B) class (C) html (D) exe 2、 已知表达式 int m = 0, 1, 2, 3, 4, 5, 6 ;下面哪个表达式的值与数组元素个数相等? ( )。 (A) m.length() (B) m.length (C) m.length()+1 (D) m.length+1 3、在 Java Applet 程序用户自定义的 Applet 子类中,一般需要覆盖父类的 ( )方法来完成一些画图操作。 (A)start( ) (B)stop( ) (C) init( ) (D) paint( ) 4、 如下哪个字 符 串是 Java 中的标识符? ( )。 (A) fieldname (B) super (C) 3number (D) #number 5、关于被私有访问控制符 private 修饰的成员变量,以下说法正确的是( ) (A)可被三种类引用:该类自身、与它在同一个包中的其他类、在其他包中的该类的子类 (B)可以被两种类访问和引用:该类本身、该类的所有子类 (C)只能被该类自身所访问和修改 (D)只能被同一个包中的类访问 6、 Java 中 main()函数的值是什么类型 ?( ) (A) String (B) int (C) char (D) void 7、执行完代码 int x = new int25;后,以下哪项说明是正确的( ) (A)x24为 0 (B)x24未定义 (C)x25为 0 (D)x0为空 8、以下代码段执行后的输出结果为( ) int x=3; int y=10; System.out.println(y%x); (A)0 (B)1 (C)2 (D)3 9、 已知如下代码: public class Test long a = new long10; public static void main ( String arg ) System.out.println ( a6 ); 请问 下面哪个语句是正确的 ( ) (A) Output is null. (B) Output is 0. (C) When compile, some error will occur. (D) When running, some error will occur. 10、 给出下面的代码段 : public class Base int w, x, y ,z; public Base(int a,int b) x=a; y=b; public Base(int a, int b, int c, int d) / assignment x=a, y=b w=d; z=c; 在代码说明 / assignment x=a, y=b 处写入如下哪个代码是正确的? ( ) (A) Base(a,b); (B) x=a, y=b; (C) super(a,b); (D) this(a,b); 11、给出如下代码 : class Test private int m; public static void fun() / some code. 如何使成员 变量 m 被函数 fun()直接访问( ) (A)将 private int m 改为 protected int m (B)将 private int m 改为 public int m (C)将 private int m 改为 static int m (D)将 private int m 改为 int m 12、下面哪个函数是 public void example().的重载函数( ) (A)public double example2(int m). 4(B)public int example(). (C)public void example2(). (D)public int example ( int m, float f). 13、以命令 ”java MyTest a b c”执行文件 MyTest.class 后,表达式( )为真 (A)args0 = MyTest a b c (B)args0 = MyTest (C)args0 = a (D)args1= b 14、 当包含 applet 的页 面被重新加载时会自动调用以下哪个函数? ( ) (A) init() (B) start() (C) stop() (D) destroy() 15、 在 编写 Java Applet 程序时,若需要对发生的事件作出响应和处理,一般需要在程序的开头写上 ( )语句 (A) import java.awt.*; (B) import java.applet.* ; (C) import java.io.* ; (D) import java.awt.event.* ; 二、判断题 (每小题 2 分,共 20 分 ) 1、 Java 的字符类型采用的是 ASCII 编码。 2、 class A.等价于 class A extends Object.。 3、抽象方法必须在抽象类中,所以抽象类中的方法都必须是抽象方法。 4、 Java 中数组的元素可以是简单数据类型的量,也可以是某一类的对象。 5、一个 Java 类可以有多个父类。 6、子类的域和方法的数目一定大于等于父类的域和方法的数目。 7、 System 类不能实例化,即不能创建 System 类的对象。 8、接口里的方法必须全部都声明成 abstract。 9、 最终类不能派生子类,最终方法不能被 重载。 10、 设 String 对象 s=”Hello ”,运行语句 System.out.println(s.concat(“World!”);后 String 对象 s 的内容为 ”Hello world!”,所以语句输出为: Hello world!。 三、填空题(每空格 2 分,共 20 分) 1、 根据程序的构成和运行环境的不同, Java 源程序分为两类: _程序和 _程序。 2、在 Java 的基本数据类型中, char 型采用 Unicode 编码方案,每个 Unicode 码占用 _字节内存空间。 3、 在 Java 程序中,通过类的定义只能实现 _重继承,但通过接口的定义可以实现 _重继承关系。 4、 _方法是一种仅有方法头,没有具体方法体和操作实现的方法,该方法必须在抽象类或接口之中定义。 _方法是不能被当前类的子类重新定义的方法。 5、如果一个 Java Applet 源程序文件只定义有一个类,该类的类名为 MyApplet,则类 MyApplet 必须是 _类的子类并且存储该源程 序文件的文件名为 _。 6、 Java 中所有类都是类 _ 的子类。 四、写出下列程序的输出。 (每小题 5 分,共 20 分 ) 1、 class Parent void printMe() System.out.println(“parent”); class Child extends Parent void printMe() System.out.println(“child”); void printAll() super.printMe(); this.printMe(); printMe(); public class Test_this public static void main(String args ) Child myC=new Child(); myC.printAll(); 2、 public class Test public static void main(String args) int a=new int5; for(int i=0;i0;i-) System.out.println(a+i+=+ai); 3、 public class BreakLoop public static void main(String args) int num=5; for (num=1;num5;num+) System.out.println(num1=+num); System.out.println(-); for (num=1;num5;num+) if (num=3) break; System.out.println(num2=+num); System.out.println(-); for (num=1;num5;num+) if (num=3) continue; System.out.println(num3=+num); 4、 public class Cruncher Crunch( int i ) System.out.println(“int version”); Crunch(String s) System.out.println(“String version”); public static void main(String args ) new Cruncher (1); 五、使用 Java 语言编写程序。 (共 10 分 ) 1、编写一个字符界面的 Java Application 程序,接 受用户输入的 10 个整数,并输出这 10 个整数的最大值和最小值。 JAVA 语言与面向对象程序设计标准答案 一、单选择题 (每小题 2 分,共 30 分 ) 1. B 2. B 3. D 4. A 5. C 6. D 7. A 8. B 9. C 10. D 11. C 12. D 13. C 14. B 15. D 二、判断题 (每小题 2 分,共 20 分 ) 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 三、填空题(每空格 2 分,共 20 分) 1. Application Applet 2. 2 3. 单重 多重 4. 抽象 最终 5. Applet MyApplet.java 4. Object 四、写出下列程序的输出。 (每小题 5 分,共 20 分 ) 1. parent child child 2. a3= 3 a2= 2 a1= 1 3. num1=1 num1=2 num1=3 num1=4 - num2=1 num2=2 - num3=1 num3=2 num3=4 4. int version 五、使用 Java 语言编写程序。 (共 10 分 ) import java.io.*; public class maxandmin public static void main(String args) int max=0, min=0, value=0; for (int i=1; imax ? value : max; min = valuemin ? value : min; catch(NumberFormatException enf) System.out.println(整数格式输入错误,请重新输入。 n); i-; catch(IOException ioe) System.out.println(一般输入输出错误,程序终止。 ); System.exit(0); / end of for System.out.println(最大数为: + max); System.out.println(最小数为: + min); / end of method / end of class 请您删除一下内容, O( _ )O 谢谢! 2015 年中央电大期末复习考试小抄大全,电大期末考试必备小抄,电大考试必过小抄 After earning his spurs in the kitchens of The Westin, The Sheraton, Sens on the Bund, and a sprinkling of other top-notch venues, Simpson Lu fi nally got the chance to become his own boss in November 2010. Sort of. The Shanghai-born chef might not actually own California Pizza Kitchen (CPK) but he is in sole charge of both kitchen and frontof- house at this Sinan Mansionsstalwart. Its certainly a responsibility to be the head chef, and then to have to manage the rest of the restaurant as well, the 31-year-old tells Enjoy Shanghai. In hotels, for example, these jobs are strictly demarcated, so its a great opportunity to learn how a business operates across the board. It was a task that management back in sunny California evidently felt he was ready for, and a vote of confi dence from a company that, to date, has opened 250 outlets in 11 countries. And for added pressure, the Shanghai branch was also CPKs China debut. For sure it was a big step, and unlike all their other Asia operations that are franchises, they decided to manage it directly to begin with, says Simpson. Two years ago a private franchisee took over the lease, but the links to CPK headquarters are still strong, with a mainland-based brand ambassador on hand to ensure the business adheres to its ethos of creating innovative, hearth-baked pizzas, a slice of PR blurb that Simpson insists lives up to the hype. They are very innovative, he says. The problem with most fast food places is that they use the same sauce on every pizza and just change the toppings. Every one of our 16 pizza sauces is a unique recipe that has been formulated to complement the toppings perfectly. The largely local customer base evidently agrees and on Saturday and Sunday, at least, the place is teeming. The kids-eat-for-free policy at weekends is undoubtedly a big draw, as well as is the spacious second-fl oor layout overlooked by a canopy of green from Fuxing Park over the road. The company is also focusing on increasing brand recognition and in recent years has taken part in outside events such as the regular California Week. Still, the sta are honest enough to admit that business could be better; as good, in fact, as in CPKs second outlet in the popular Kerry Parkside shopping mall in Pudong. Sinan Mansions has really struggled to get the number of visitors that were envisaged when it first opened, and it hasnt been easy for any of the tenants here, adds Simpson. Were planning a third outlet in the city in 2015, and we will probably choose a shopping mall again because of the better foot traffic. The tearooms once frequented by Coco Chanel and Marcel Proust are upping sticks and coming to Shanghai, Xu Junqian visits the Parisian outpost with sweet treats. One thing the century-old Parisian tearoom Angelina has shown is that legendary fashion designer Coco Chanel not only had style and glamor but also boasted great taste in food, pastries in particular. One of the most popular tearooms in Paris, Angelina is famous for having once been frequented by celebrities such as Chanel and writer Marcel Proust. Now Angelina has packed up its French ambience, efficient service, and beautiful, comforting desserts and flown them to Shanghai. At the flagship dine-in and take-out space in Shanghai, everything mimics the original tearoom designed from the beginning of the 20th century, in Paris, the height of Belle Epoque. The paintings on the wall, for example, are exactly the same as the one that depicts the landscape of southern France, the hometown of the owner; and the small tables are intentional imitations of the ones that Coco Chanel once sat at every afternoon for hot chocolate. The famous hot chocolate, known as LAfricain, is a luxurious mixture of four types of cocoa beans imported from Africa, blended in Paris and then shipped to Shanghai. Its sinfully sweet, rich and thick as if putting a bar of melting chocolate directly on the tongue and the fresh whipped cream on the side makes a light, but equally gratifying contrast. It is also sold in glass bottles as takeaway. The signature Mont-Blanc chestnut cake consists of three parts: the pureed chestnut on top, the vanilla cream like stuffing, and the meringue as base. Get all three layers in one scoop, not only for the different textures but also various flavors of sweetness. The dessert has maintained its popularity for a century, even in a country like France, perhaps the worlds most competitive place for desserts. A much overlooked pairing, is the Paris-New York choux pastry and N226 chocolate flavored tea. The choux pastry is a mouthful of airy pecan-flavored whipped cream, while the tea, a blend of black teas from China and Ceylon, cocoa and rose petals, offers a more subtle fragrance of flowers and chocolate. Ordering these two items, featuring a muted sweetness, makes it easier for you to fit into your little black dress. Breakfast, brunch, lunch and light supper are also served at the tearoom, a hub of many cultures and takes in a mix of different styles of French cuisines, according to the management team. The semi-cooked foie gras terrine, is seductive and deceptive. Its generously served at the size and shape of a toast, while the actual brioche toast is baked into a curved slice dipped with fig chutney. The flavor, however, is honest: strong, smooth and sublime. And you dont actually need the toast for crunchiness. This is the season for high teas, with dainty cups of fine china and little pastries that appeal to both visual and physical appetites. But there is one high tea with a difference, and Pauline D. Loh finds out just exactly why it is special. Earl Grey tea and macarons are all very well for the crucial recuperative break in-between intensive bouts of holiday season shopping. And for those who prefer savory to sweet, there is still the selection of classic Chinese snacks called dim sum to satisfy and satiate. High tea is a meal to eat with eye and mouth, an in-between indulgence that should be light enough not to spoil dinner, but sufficiently robust to take the edge off the hunger that strikes hours after lunch. The afternoon tea special at Shang-Xi at the Four Seasons Hotel Pudong has just the right elements. It is a pampering meal, with touches of luxury that make the high tea session a treat in itself. Whole baby abalones are braised and then topped on a shortcrust pastry shell, a sort of Chinese version of the Western vol-au-vent, but classier. Even classier is the dim sum staple shrimp dumpling or hargow, upgraded with the addition of slivers of midnight dark truffles. This is a master touch, and chef Simon Choi, who presides unchallenged at Shang-Xi, has scored a winner again. Sweet prawns and aromatic truffles whats not to love? His masterful craftsmanship is exhibited in yet another pastry a sweet pastry that is shaped to look like a walnut, but which you can put straight into the mouth. It crumbles immediately, and the slightly sweet, nutty morsel is so easy to eat youll probably reach straight for another. My favorite is the dessert that goes by the name yangzhi ganlu, or ambrosia from the gods. The hotel calls it chilled mango cream with sago, pomelo and birds nest made with ingredients that resonate wit
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024-2025学年新教材高中物理 第一章 静电场的描述 第2节 库仑定律说课稿 粤教版必修3
- 2024-2025学年高中物理 第五章 曲线运动 5 向心加速度(3)说课稿 新人教版必修2
- 2024-2025学年高中生物 第4章 第2节 种群数量的变化说课稿 新人教版必修3001
- 5健康游戏我常玩(说课稿)-2023-2024学年道德与法治二年级下册统编版
- 2024-2025学年高中语文 第一单元 三 知之为知之不知为不知说课稿4 新人教版选修《先秦诸子选读》
- 二零二五年度私人抵押车辆合同范本规范版
- 二零二五年度汽车贷款提前还款合同范本下载2篇
- 14《月相的变化》说课稿-2023-2024学年科学四年级下册人教鄂教版
- 水上项目合作合同(2篇)
- 2024年春七年级道德与法治下册 第一单元 青春时光 第一课 青春的邀约 第1框 悄悄变化的我说课稿 新人教版001
- 充电桩知识培训课件
- 2025年七年级下册道德与法治主要知识点
- 2025年交通运输部长江口航道管理局招聘4人历年高频重点提升(共500题)附带答案详解
- 老年髋部骨折患者围术期下肢深静脉血栓基础预防专家共识(2024版)解读
- 广东省广州市2025届高三上学期12月调研测试(零模)英语 含解析
- 偏瘫足内翻的治疗
- 药企质量主管竞聘
- 信息对抗与认知战研究-洞察分析
- 心脑血管疾病预防课件
- 手术室专科护士工作总结汇报
- 2025届高三听力技巧指导-预读、预测
评论
0/150
提交评论