已閱讀5頁,還剩2頁未讀, 繼續(xù)免費閱讀
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
電大 JAVA 語言與面向?qū)ο蟪绦蛟O(shè)計 期末復(fù)習(xí)試題及答案小抄 一、單選擇題 (每小題 2 分,共 30 分 ) 1、編譯 Java Application 源程序文件將產(chǎn)生相應(yīng)的字節(jié)碼文件,這些字節(jié)碼文件的擴(kuò)展名為 ( )。 (A) java (B) class (C) html (D) exe 2、 已知表達(dá)式 int m = 0, 1, 2, 3, 4, 5, 6 ;下面哪個表達(dá)式的值與數(shù)組元素個數(shù)相等? ( )。 (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 中的標(biāo)識符? ( )。 (A) fieldname (B) super (C) 3number (D) #number 5、關(guān)于被私有訪問控制符 private 修飾的成員變量,以下說法正確的是( ) (A)可被三種類引用:該類自身、與它在同一個包中的其他類、在其他包中的該類的子類 (B)可以被兩種類訪問和引用:該類本身、該類的所有子類 (C)只能被該類自身所訪問和修改 (D)只能被同一個包中的類訪問 6、 Java 中 main()函數(shù)的值是什么類型 ?( ) (A) String (B) int (C) char (D) void 7、執(zhí)行完代碼 int x = new int25;后,以下哪項說明是正確的( ) (A)x24為 0 (B)x24未定義 (C)x25為 0 (D)x0為空 8、以下代碼段執(zhí)行后的輸出結(jié)果為( ) 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 被函數(shù) 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、下面哪個函數(shù)是 public void example().的重載函數(shù)( ) (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”執(zhí)行文件 MyTest.class 后,表達(dá)式( )為真 (A)args0 = MyTest a b c (B)args0 = MyTest (C)args0 = a (D)args1= b 14、 當(dāng)包含 applet 的頁 面被重新加載時會自動調(diào)用以下哪個函數(shù)? ( ) (A) init() (B) start() (C) stop() (D) destroy() 15、 在 編寫 Java Applet 程序時,若需要對發(fā)生的事件作出響應(yīng)和處理,一般需要在程序的開頭寫上 ( )語句 (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 中數(shù)組的元素可以是簡單數(shù)據(jù)類型的量,也可以是某一類的對象。 5、一個 Java 類可以有多個父類。 6、子類的域和方法的數(shù)目一定大于等于父類的域和方法的數(shù)目。 7、 System 類不能實例化,即不能創(chuàng)建 System 類的對象。 8、接口里的方法必須全部都聲明成 abstract。 9、 最終類不能派生子類,最終方法不能被 重載。 10、 設(shè) String 對象 s=”Hello ”,運行語句 System.out.println(s.concat(“World!”);后 String 對象 s 的內(nèi)容為 ”Hello world!”,所以語句輸出為: Hello world!。 三、填空題(每空格 2 分,共 20 分) 1、 根據(jù)程序的構(gòu)成和運行環(huán)境的不同, Java 源程序分為兩類: _程序和 _程序。 2、在 Java 的基本數(shù)據(jù)類型中, char 型采用 Unicode 編碼方案,每個 Unicode 碼占用 _字節(jié)內(nèi)存空間。 3、 在 Java 程序中,通過類的定義只能實現(xiàn) _重繼承,但通過接口的定義可以實現(xiàn) _重繼承關(guān)系。 4、 _方法是一種僅有方法頭,沒有具體方法體和操作實現(xiàn)的方法,該方法必須在抽象類或接口之中定義。 _方法是不能被當(dāng)前類的子類重新定義的方法。 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 個整數(shù),并輸出這 10 個整數(shù)的最大值和最小值。 JAVA 語言與面向?qū)ο蟪绦蛟O(shè)計標(biāo)準(zhǔn)答案 一、單選擇題 (每小題 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(整數(shù)格式輸入錯誤,請重新輸入。 n); i-; catch(IOException ioe) System.out.println(一般輸入輸出錯誤,程序終止。 ); System.exit(0); / end of for System.out.println(最大數(shù)為: + max); System.out.println(最小數(shù)為: + min); / end of method / end of class 請您刪除一下內(nèi)容, O( _ )O 謝謝! 2015 年中央電大期末復(fù)習(xí)考試小抄大全,電大期末考試必備小抄,電大考試必過小抄 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. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年度鋼材產(chǎn)業(yè)鏈上下游合作協(xié)議模板
- 科技行業(yè)專題報告:DeepSeek:技術(shù)顛覆or創(chuàng)新共贏
- 奮斗新時代決心鑄就輝煌
- 2025版城市地下空間挖掘機(jī)租賃合同協(xié)議書3篇
- 2025個人藝術(shù)品收藏分期付款合同2篇
- 2025年個人借款咨詢與風(fēng)險管理服務(wù)協(xié)議4篇
- 2025版土地承包經(jīng)營權(quán)流轉(zhuǎn)合同示范書6篇
- 2025年全球及中國絕對大分子多角度光散射檢測器行業(yè)頭部企業(yè)市場占有率及排名調(diào)研報告
- 2025-2030全球柔性表面加熱器行業(yè)調(diào)研及趨勢分析報告
- 2025-2030全球噴丸服務(wù)行業(yè)調(diào)研及趨勢分析報告
- 2025水利云播五大員考試題庫(含答案)
- 老年髖部骨折患者圍術(shù)期下肢深靜脈血栓基礎(chǔ)預(yù)防專家共識(2024版)解讀
- 藥企質(zhì)量主管競聘
- 信息對抗與認(rèn)知戰(zhàn)研究-洞察分析
- 中藥飲片驗收培訓(xùn)
- 手術(shù)室??谱o(hù)士工作總結(jié)匯報
- 2025屆高三聽力技巧指導(dǎo)-預(yù)讀、預(yù)測
- DB34T 1831-2013 油菜收獲與秸稈粉碎機(jī)械化聯(lián)合作業(yè)技術(shù)規(guī)范
- 蘇州市2025屆高三期初陽光調(diào)研(零模)政治試卷(含答案)
- 創(chuàng)傷處理理論知識考核試題及答案
- (正式版)HG∕T 21633-2024 玻璃鋼管和管件選用規(guī)定
評論
0/150
提交評論