廣告

喵嗚~話說我這幾天過生日真的過到玩瘋了...為了表示我是誠心悔過,所以我打算今天把《資料庫系統》第三與第四章的學習評量重點寫出來嘍!
至於為何一次寫兩章呢?主要是因為這兩章的選擇題真的太少、太少啦!(因為這兩章就開始實作了嘛)
好嘍!以下就不多廢話了,我先趕快來把評量打完,好到學校交作業啦!


第三章:
1. Access建立資料庫檔案的副檔名是.mdb
2. Access資料庫的資料表是儲存資料的物件。
3. Access資料庫的表單可以建立資料庫的使用介面。
4. Access資料庫系統屬於關聯式資料庫系統。
5. Access資料庫視窗預設的物件清單顯示方式為清單

第四章:
1. 將資料表視為一個二維表格,則一筆記錄是指表格的一列
2. 若數字資料型態的欄位資料範圍是1~100,則位元組欄位類型是最佳選擇。
3. 若不想輸入資料表的欄位資料,則可使用自動編號的資料類型自動產生欄位資料。
4. 若欄位儲存的資料是文字資料,其長度最大可能超過300字元,則資料表欄位需要選擇備忘資料類型。
5. 若欄位儲存資料格式是第1個字元為數字,之後英文字母,則資料表欄位需要設定輸入遮罩的屬性。
6. 在資料工作表刪除記錄,在選取記錄後,可以按Delete鍵刪除。
7. 在資料工作表若需要移至前一筆記錄,可按

如雲 發表在 痞客邦 留言(7) 人氣()

  • Oct 08 Wed 2008 06:37
  • 墮落

哈~結果昨天整理好房間、洗好浴室後,時間也晚了...所以我昨天仍舊沒看書@@天啊!我連續四天沒看書了耶!
聽說我暑假也沒那麼混啊= =我真的是玩瘋了嗎?感覺這樣真的不行唷!
話說昨天跟小薪在幫同學灌電腦的時候,強哥的電腦真的讓我感到很無言耶!
怎麼會有人把Windows XP灌在D槽?怎麼會有人去亂分割磁碟?重點是怎麼會有人把主分割灌在擴充分割的後面啊!!!
我真的很無言啊!

強哥用懶人包灌出來的東西雖然只跟我們說只有兩個驅動找不到,但是他用懶人包灌的= =誰看的出來他是少什麼驅動啊Orz...
結果還不是得幫他整個重灌= ="(再次無言)

所以昨天我又晚睡了...連續五天的睡眠不足,我感覺好無力..好累唷!

今天還要去找主任談下星期一要跟訪視委員那天約談的時候要講些什麼的感覺(感覺真麻煩)

算了,我想今天就不寫太多了
超累的,希望今夾的星期三症候群別太嚴重才好!

PS.我已連續兩個晚上睡覺快被蚊子煩死了(抓狂...)

如雲 發表在 痞客邦 留言(8) 人氣()

今年的生日,我真的很快樂、很開心!而且不單單只有昨天是如此,而是從幾天前的行程到今天,我都是如此!
我要感謝每一位曾祝福過我的人、我要感謝每一個陪我慶祝的人、我還要感謝所有送我禮物的人!真的,我真的要謝謝你們,你們讓我好開心、好快樂^_^
我還要感謝我的父母,所以我昨晚與我父親去享用了大餐!(我想我這幾天下來起馬有胖五公斤以上吧!吃超多...)
我更要感謝老天爺!是在他的安排下,我才能有如此順利的行程,也才可以如此享樂!
各位知道嗎?除了這幾天東奔西跑的活動之外,還有部落軌道都在我生日當天升到了四級,還收到了生活場的會員卡(嘿嘿~我現在已不是拿紙卡嘍!)
有著太多、太多的巧合,這些讓我不得不去感謝蒼天對我的疼愛!
感謝祂所賜予我的一切!感謝祂讓我認識了許多貴人!感謝祂讓我結交到良友!感謝祂如此巧妙地安排著我的課題!感謝!感謝!!我真心地感謝!!!

今天,是星期二嘍!
雖然今天我不用上課,但也差不多該收收心了!
我打算等等去領完掛號信之後,回家把房間整理整理
利用整理房間讓自己好好地收心嘍!
雖然雙十節我想我還是會出門玩吧!
但也不能再混下去了,不然我想我一直玩到下星期的話,我的心應該會很難收回來吧!
我打算整理好後去試一些yku大大教我的東西,如果還有時間的話把剩下的SCJP看完,之後就要全力去準備那些不懂的題目嘍!
然後晚上還要請小薪幫我的同學們灌電腦!
總之,仍是希望一切順利啦!
也祝大家有個愉快的一天^_^

如雲 發表在 痞客邦 留言(13) 人氣()

呵呵~昨天雖然我還是沒有比較早回到家,但因為不用自己洗頭髮,所以還是把衣服洗出來嘍!
今天是10月6日,是我23歲的生日!這些年來感謝有著朋友們的相助,讓我逐漸改變,一步步向幸福靠近中......
話說昨天姊姊約了他的兩個同學來一起幫我過生日!感謝他們與姊姊陪我玩了一天,還送我生日禮物嘍!
早上一早在我要準備出門之前,接到姊姊會來接我的電話(開心)接著我們到美麗華先去買海角七號的電影票
沒想到到現在《海角七號》還是那麼難買到比較好的位置,所以我們買的是下午四點的票,然後就到香積廚去吃午餐嘍!
吃完因為距離電影開始時間還早,而王俐人的店就在對面,所以我們就先把去洗頭髮啦!我還做了護髮唷!

而且昨天我還聽到一件讓我很開心的事情就是:阿萬跟我說我之前寫的《
王俐人-剪髮記》的事情有讓人看完後去燙髮,還辦法會員(真感動我寫的日記能有如此的影響力)
另一件讓我很快樂的是,因為我被落枕的事時悄困擾了幾天,阿萬幫我按按後,雖然沒全好,但至少能轉動脖子嘍!

最後我們再回到美麗華去看《海角七號》,我覺得他整部片都還滿好笑,滿好玩的!但還是有些橋段讓我幾度鼻酸差點哭了出來......
看來我對感情的免疫力還是不夠......
總之這兩天我玩的好累嘍!
感謝大家對我那麼好,願意陪我^_^

今天是我的生日,學姊說會買早餐來請我吃,我在這先謝謝學姊嘍!
今年,我想會是我最快樂的一年的生日^_^

如雲 發表在 痞客邦 留言(15) 人氣()

昨天我吃完早餐後,又在網路上摸了好一陣子才出門。我先到了醫院看一下奶奶,還把外勞嚇到(我太早去嚇到他了ccc)
後來我就在約定的時間之前到了好樂迪的門口等他們嘍!大家都很準時^_^而成員有我、學姐、不要跟堯堯,共四人
一開始確證身份的手續是讓我感到有些小小的麻煩啦(因為要抄學姐的學號),但後來看到包箱我還滿喜歡的!
包箱的門一進去看到的是間廁所(很開心包廂內就有廁所啦!)而且要轉進去才是我們的座位,這樣的好處就是不會被經過的人看到我們在做什麼嘍!(雖然那間是最邊間也很少人會路過啦= =)
我們就定位後還是一直在聊天,雖然有在問說是不是要先點歌,但還是忙著在聊,而好奇點播器在玩弄那台機器的我,就率先點了許茹芸的淚海做了開場啦!(哈哈~還好我還沒忘記怎麼唱)

大略唱過一些歌之後,我跟學姐的話匣子又打開啦!可憐的包箱就只剩不要與堯堯兩個人在撐場面,唱個不停,還一直叫我們點歌......
好不容易到了我們的歌曲時,他們馬上爭取時間衝去外面拿吃的,而我跟學姐仍是在聊,到後來我自己都覺得很好笑,就跟學姐說唱完再聊吧!
但我們才唱到間奏我們又繼續接著聊了= ="還好他不要和堯堯回來的時候,間奏已結束,我們又開始唱嘍!(因為這樣讓我在唱到一半時想到都會笑場Orz...)

就在我們吃飽喝足也唱夠之後,就轉戰光華商場啦!那除了不要之外,我們其他人都是第一次去新光華!
可惜人太多,車車不好停,所以我們去買了東西很快就走了......然後我們跑到行天宮附近看88元起的衣服
不要跟堯堯就開始亂搭衣服惡搞了起來,整個就是超好笑的,但我想他們應該也不敢穿那樣出門吧!
連學姐看到那樣都在懷疑我們是不是有在打什麼賭,玩成這樣XD
嘿嘿~那些經典畫面可是有拿不要的手機拍下來嘍!^_^如下:

接著前往保齡球館!因為我不會打,感覺我都是在亂丟球,但也還滿好玩的啦!而且他們都有教我(開心)

打完球時也快六點了,原本不要打算打到回府了(那邊離不要的家還滿近的)
只是我們話匣子再度開啟,又決定前往師大夜市逛逛嘍!
我們在師大夜市找了間飲料店進去休息聊天,我想這是不要跟堯堯第一次發現我跟學姐那麼能聊,不知道有沒有嚇到他們XD

這一整天除了讓我覺得錢花的超兇以外,就是玩的很開心嘍!
特別是堯堯跟不要也玩開了,所以我們就一直說堯堯是不要的老婆,而堯堯也演的很配合,讓我跟學姐都笑到快不行

呵呵~
好啦!跟大家分享到這邊
我要先來去吃早餐準備一下今天的行程啦!
不過我今天可不能這麼晚回家了
原本打算昨天要洗衣服的,但到家太晚,所以今天一定要洗衣服嘍!
就這樣啦!
也祝大家有個愉快的一天^_^

如雲 發表在 痞客邦 留言(9) 人氣()

喵嗚~好開心啊!今天算是我第一次「正式」地要去好樂迪嘍!是要跟學姐及別系的同學們去^_^
話說這次是他們把事情計劃好的(我又不懂= =也不太可能會是我計劃啦!)我想我只需要開開心心地去玩,好好的放鬆一下就好嘍!
我真的是需要放鬆啦!昨天又發生了我會看英文跳行的情況了......
沒辦法嘛!那些都英文的東西,而我們的組員帶來的筆記型電腦每台的作業系統都不同
東找找西看看,真的感覺還滿累的......也浪費了不少時間在看說明,就在看到不支援VISTA時...很好,我整個人被無力感壓了下去......

很累耶!虧我看的那麼努力(其實也不過就在找認識的句字看而已啦!)
結果又是臭臭臭臭臭臭臭VISTA不支援是怎樣啦!小氣鬼、喝涼水、早上起床變魔鬼...
而另外一個同學是LINUX的,我想他的是一定能灌,只是...他一直覺得他是對的,但卻都沒找到正確的檔案!
我覺得我跟他無法溝通,耐性也差不多到極限了....
我不介意一起找或甚至是我慢慢幫他找,但我很受不了一個半調子不能正常使用的東西,有人一再地告訴我那個是正確的。這點真的讓我不能認同也不能接受!那麼有自負,想的邏輯我永遠搞不懂,那你自行解決吧!
這個週末到星期二我要好好地去過我的生日,彌補我去年因颱風留下的缺憾(這樣形容不知道會不會太嚴重了@@")
反正我若有空還是會大略地去看一下我要他們先去收集的資料或資訊,而我跟那個與我同天生日的組員可以放生日假啦!
再說,之前都是我在準備的,所以這次我一定要好好地去放鬆玩玩嘍!
而且我也想順便看看那位最混的組員會交出怎麼樣的成績!

好啦!不多寫了,先來去煮水煮蛋吃,吃飽我要先來去準備出門啦!(好期待)
(迷之音:你有會唱的流行歌曲嗎?)

如雲 發表在 痞客邦 留言(17) 人氣()

話說我昨天真的不知道是太忙、太混亂還是怎樣!反正一一發現之前的蠢事嘍!{#emotions_dlg.emotion_b02}好吧!就當我是在搞笑好了Orz...
以下我就來一件件事寫出來提供給大家當作娛樂吧!@@{#emotions_dlg.emotion_012}
昨天早上我依舊在家摸了很久才出門(沒辦法嘛!誰叫這幾天的天氣都十分讓人感到好睡{#emotions_dlg.emotion_010})
不過還算不錯啦!我還是在九點之前就到學校了{#emotions_dlg.emotion_003}我就想說還有二十幾分鐘可以先去找老師把公文處理掉
所以先去系辦找助教問完後,再去老師的辦公室找老師...
我們做到一半時,我聽到了鐘響,以為是第一節課的下課鐘,所以不以為意{#emotions_dlg.emotion_005}
沒想到過了一會兒,老師跟我說要上課,來不及了,中午再說。那時我一看時間嚇到:已過上課一陣子了~~~
天啊~我還要去借實驗室的鑰匙及冷氣搖控氣(因為我們同學都不想要填寫單子及點設備{#emotions_dlg.emotion_016})結果我在衝忙之中跑來跑去,開完門又去還...
我想早上的運動量應該滿夠的= ="因為我都用跑的......

下午我在研究室搬出了我的筆記型電腦繼續研究要怎麼放data,花了滿長的時間找,到最後才看到明明下面就寫著很大的「Edit」我居然沒看到......{#emotions_dlg.emotion_015}
這樣就算了,把MySQL的指令玩了一下,後來又再建了幾筆data之後,我越來越想要上網,可是我完全不懂為何我的筆記型電腦會收不到無線網路
傻呼呼地抱著電腦跑來跑去,到後來在林老師的指點下我才知道...我的無線網路的開關沒有開Orz...
我真的做了一件非常蠢的事情...雖然我不知道是哪個天兵幫我把他關掉的......
總之,我真的覺得我昨天是非常的搞笑!!!{#emotions_dlg.emotion_b08}

希望今天教同學怎麼用MySQL的事情都可以一切順利嘍!
接下來也該準備研究要怎麼把這個跟Java連在一起嘍^_^{#emotions_dlg.emotion_b04}加油吧!

如雲 發表在 痞客邦 留言(5) 人氣()

昨天,我真的過了一個很充實,也很累的一天,不過還算滿好玩的啦!{#emotions_dlg.emotion_b06}
早上與平日沒什麼不同,依舊是上課...除了因為是生理期第二天感到特別痛苦之外沒其他特別的事情!{#emotions_dlg.emotion_012}另外就是早上起床的時候我發現我「落枕」,所以是過的非常痛苦啦!{#emotions_dlg.emotion_007}
下午分組報告的時候,同學們有些報告的還滿特別、滿有趣的嘍!{#emotions_dlg.emotion_017}
然後系週會到是沒什麼特別的,我借了同學的手機玩遊戲玩了快一個小時吧!(說真的,還玩的滿累的@@){#emotions_dlg.emotion_016}
後來回到研究室把昨天要討論專題的主題跟組員們大致上講了一下,我就去送公文嘍!
因為滿久沒遇到會計小姐了,在一邊處理事情時也聊上了兩句(開心){#emotions_dlg.emotion_003}
再回到研究室把東西放好後,我就到實驗室去找學長們嘍!
我到實驗室時,學長們都把機器放到機架上了,主機及相關的設備也都裝的差不多嘍!{#emotions_dlg.emotion_b02}果然學長們很強,效率真好{#emotions_dlg.emotion_b07}(一級棒)
那些機器都是我第一次看到(實驗室內其他新電腦吸引不到我的注意力{#emotions_dlg.emotion_010}),因為學長們也修過那些課,但我還是很好奇地東看看、西問問就是嘍!
在此我要感謝學長們及老師都很有耐心地願意為我解答{#emotions_dlg.emotion_b01}後來把老師請大家喝的50嵐分給學長們後,再把實驗室收捨收捨,我們就準備閃人啦!
回到研究室之後,再跟老師說缺少的公文,抓好之後我就搭上恩師的車車回家啦!{#emotions_dlg.emotion_b04}
呵呵~還好昨天的星期三症候群沒我想像中的嚴重^_^{#emotions_dlg.emotion_027}

如雲 發表在 痞客邦 留言(8) 人氣()

颱風不要來,起馬HIGOS我拜託你這星期不要來...{#emotions_dlg.emotion_014}親愛的老天,可憐可憐我吧!
去年的秋颱剛好在我生日那天,害我得被關在家中搶救被水淹到的東西......{#emotions_dlg.emotion_002}
今年星期六都約好要跟同學出去玩,星期日也有慶生!求求祢,不要每週一颱好不好?{#emotions_dlg.emotion_015}

而且也請祢稍徵讓大家喘口氣嘛!有些人前兩次的災害都還沒處理完善,又緊接著再來颱風,對他們來說真的很可憐耶!{#emotions_dlg.emotion_016}
再說祢這樣每週一颱,也讓許多企業的業主感到困擾呢!
雖然我會說最好颱風要放假放星期三,但能不要有颱風所帶來的災難,其實不放假我覺得也沒差啊!@@"
我是知道每次只要有什麼天災才能讓較多的人重視到大自然的重要,也才能令更多人想到要愛護地球...
可是這接連而來的氣候變化,我相信現在注意到的人越來越多,而且至少最近大家都還會重視這個課題......
所以拜託祢好不好,不要讓颱風在這個週末來...謝謝^_^我知道祢對我最好、最好了{#emotions_dlg.emotion_003}

如雲 發表在 痞客邦 留言(9) 人氣()

我昨天過了個還算悠閒的日子,早上寫完日記,因著情緒的低落,我打開了電視轉到HBO,拆開餅乾開始吃餅乾看電影XD{#emotions_dlg.emotion_b02}
因為我會怕胖,所以沒拿太多餅乾,後來餅乾吃完了,但電影還沒演完該怎麼辦呢?{#emotions_dlg.emotion_013}我拿出了我之前煮好的水煮蛋慢慢吃,再挑了六顆葡萄慢慢咬......
總之吃到後來我真的覺得不能再吃,也實在吃不下時,我把東西收了收,再度打開電腦,開始與人在網路上聊天邊看HBO{#emotions_dlg.emotion_b06}
中午吃完午餐後,經過我左思右想,我還是決定這次的小組報告我既然是負責書面報告的,與其一直等待其他組員是否有辦法幫忙列印,到不如我自己把印表機的事情搞定吧!{#emotions_dlg.emotion_b07}
也因為如此,前前後後我跑了三趟燦坤3C(累到爆{#emotions_dlg.emotion_b11}),還買了一組墨水(有夠貴{#emotions_dlg.emotion_002}千元大鈔就這樣飛了{#emotions_dlg.emotion_016}),不過最後電器醫院的員工也教了我一些東西,還幫我把印表機也校正好嘍!(開心){#emotions_dlg.emotion_b04}

正所謂有失必有得嘛!反正我的心情變的比較好以後,下午我很自然地又拿起SCJP的考題出來看了,以下就是我昨天遇到的問題,還麻煩各位大大的教導嘍!{#emotions_dlg.emotion_014}謝謝^_^{#emotions_dlg.emotion_b01}

 

 


 

Overriding與Overloading

50.
A programmer needs to create a logging method that can accept an
arbitrary number of arguments. For example, it may be called in these ways:
logIt("log message1");
logIt("log message2","log message3");
logIt("log message4","log message5","log message6");
Which declaration satisfies this requirement?
A. public void logIt(String * msgs)
B. public void logIt(String [] msgs)
C. public void logIt(String... msgs)
D. public void logIt(String msg1, String msg2, String msg3)
這我根本看不懂= ="


106.
Given:

1.  interface A { public void aMethod(); }
2.  interface B { public void bMethod(); }
3.  interface C extends A,B { public void cMethod(); }
4.  class D implements B {
5.      public void bMethod(){}
6.  }
7.  class E extends D implements C {
8.      public void aMethod(){}
9.      public void bMethod(){}
10.    public void cMethod(){}
11. }

What is the result?
A. Compilation fails because of an error in line 3.
B. Compilation fails because of an error in line 7.
C. Compilation fails because of an error in line 9.
D. If you define D e = new E(), then e.bMethod() invokes the version of bMethod() defined in Line 5.
E. If you define D e = (D)(new E()), then e.bMethod() invokes the version of bMethod() defined in Line 5.
F. If you define D e = (D)(new E()), then e.bMethod() invokes the version of bMethod() defined in Line 9.
這題我不懂為何?


197.
What is the result?
197
A. Value is: 8
B. Compilation fails.
C. Value is: 12
D. Value is: -12
E. The code runs with no output.
F. An exception is thrown at runtime.
這題也是不懂Orz...


204.
 
這題我不會/___\


222.
Which two statements are true? (Choose two.)
A. An encapsulated, public class promotes re-use.
B. Classes that share the same interface are always tightly encapsulated.
C. An encapsulated class allows subclasses to overload methods, but does NOT allow overriding methods.
D. An encapsulated class allows a programmer to change an implementation without affecting outside code.
太長的述敘嚇到我了Orz...


240.
Given:
11. public class Yikes {
12.
13.     public static void go(Long n) {System.out.print("Long ");}
14.     public static void go(Short n) {System.out.print("Short ");}
15.     public static void go(int n) {System.out.print("int ");}
16.     public static void main(String [] args) {
17.         short y = 6;
18.         long z = 7;
19.         go(y);
20.         go(z);
21.     }
22. }
What is the result?

A. int Long
B. Short Long
C. Compilation fails.
D. An exception is thrown at runtime.
為什麼呢?


263.
Given:

1. class TestA {
2.     public void start() { System.out.println("TestA"); }
3. }
4. public class TestB extends TestA {
5.     public void start() { System.out.println("TestB"); }
6.     public static void main(String[] args) {
7.         ((TestA)new TestB()).start();
8.     }
9. }
What is the result?

A. TestA
B. TestB
C. Compilation fails.
D. An exception is thrown at runtime.
為何不是C呢?


269.
Given:

10. abstract public class Employee {
11.     protected abstract double getSalesAmount();
12.     public double getCommision() {
13.         return getSalesAmount() * 0.15;
14.     }
15. }
16. class Sales extends Employee {
17. // insert method here
18. }
Which two methods, inserted independently at line 17, correctly complete the Sales class? (Choose two.)

A. double getSalesAmount() { return 1230.45; }
B. public double getSalesAmount() { return 1230.45; }
C. private double getSalesAmount() { return 1230.45; }
D. protected double getSalesAmount() { return 1230.45; }
這題我還是不行Orz...


300.
Given:

1. public class Blip {
2.     protected int blipvert(int x) { return 0; }
3. }
4. class Vert extends Blip {
5. // insert code here
6. }
Which five methods, inserted independently at line 5, will compile? (Choose five.)

A. public int blipvert(int x) { return 0; }
B. private int blipvert(int x) { return 0; }
C. private int blipvert(long x) { return 0; }
D. protected long blipvert(int x) { return 0; }
E. protected int blipvert(long x) { return 0; }
F. protected long blipvert(long x) { return 0; }
G. protected long blipvert(int x, int y) { return 0; }
有沒有真的有那麼多個答案啊Orz...


309.
Given:
1. class SuperClass {
2.     public A getA() {
3.         return new A();
4.     }
5. }
6. class SubClass extends SuperClass {
7.     public B getA(){
8.         return new B();
9.     }
10. }
Which statement is true?

A. Compilation will succeed if A extends B.
B. Compilation will succeed if B extends A.
C. Compilation will always fail because of an error in line 7.
D. Compilation will always fail because of an error in line 8.
我不懂啊!為何我選的那個答案不對?


Interface

41.
What is the result?
 
A. go in Goban
     go in Sente
B. go in Sente
     go in Goban
C. go in Goban
     go in Sente
D. Compilation fails because of an error in line 17.
我昏了Orz...


44.
Given:
1. public interface A {
2.     String DEFAULT_GREETING = "Hello World";
3.     public void method1();
4. }
A programmer wants to create an interface called B that has A as its parent.
Which interface declaration is correct?

A. public interface B extends A {}
B. public interface B implements A {}
C. public interface B instanceOf A {}
D. public interface B inheritsFrom A {}
我不懂啊Orz...

48.
Given:
11. public static void parse(String str) {
12.     try {
13.         float f = Float.parseFloat(str);
14.     } catch (NumberFormatException nfe) {
15.         f = 0;
16.     } finally {
17.         System.out.println(f);
18.     }
19. }
20. public static void main(String[] args) {
21.     parse("invalid");
22. }
What is the result?

A. 0.0
B. Compilation fails.
C. A ParseException is thrown by the parse method at runtime.
D. A NumberFormatException is thrown by the parse method at runtime.
這個老師沒給答案@@"


56.
Given:
1. interface DoStuff2 {
2.     float getRange(int low, int high); }
3.
4. interface DoMore {
5.     float getAvg(int a, int b, int c); }
6.
7. abstract class DoAbstract implements DoStuff2, DoMore { }
8.
9. class DoStuff implements DoStuff2 {
10.     public float getRange(int x, int y) { return 3.14f; } }
11.
12. interface DoAll extends DoMore {
13.     float getAvg(int a, int b, int c, int d); }
What is the result?
A. The file will compile without error.
B. Compilation fails. Only line 7 contains an error.
C. Compilation fails. Only line 12 contains an error.
D. Compilation fails. Only line 13 contains an error.
E. Compilation fails. Only lines 7 and 12 contain errors.
F. Compilation fails. Only lines 7 and 13 contain errors.
G. Compilation fails. Lines 7, 12, and 13 contain errors.
為何會是A呢?


116.
Which statement is true about the classes and interfaces in the exhibit?
 
A. Compilation will succeed for all classes and interfaces.
B. Compilation of class C will fail because of an error in line 2.
C. Compilation of class C will fail because of an error in line 6.
D. Compilation of class AImpl will fail because of an error in line 2.
厚~這種寫法很累耶!/___\


Has-a與is-a

5.
Given:
10. interface Jumper { public void jump(); }
...
20. class Animal {}
...
30. class Dog extends Animal {
31.    Tail tail;
32. }
...
40. class Beagle extends Dog implements Jumper{
41.    public void jump() {}
42. }
...
50. class Cat implements Jumper{
51.    public void jump() {}
52. }
Which three are true? (Choose three.)
A. Cat is-a Animal
B. Cat is-a Jumper
C. Dog is-a Animal
D. Dog is-a Jumper
E. Cat has-a Animal
F. Beagle has-a Tail
G. Beagle has-a Jumper
為何要選F?


108.
Which four statements are true? (Choose four.)
A. Has-a relationships should never be encapsulated.
B. Has-a relationships should be implemented using inheritance.
C. Has-a relationships can be implemented using instance variables.
D. Is-a relationships can be implemented using the extends keyword.
E. Is-a relationships can be implemented using the implements keyword.
F. The relationship between Movie and Actress is an example of an is-a relationship.
G. An array or a collection can be used to implement a one-to-many has-a relationship.
這個確定不是在考英文?


196.
 
這題老師也沒給答案,我猜不到啦Orz...


Abstract-class

310.
Given:

11. public abstract class Shape {
12.     int x;
13.     int y;
14.     public abstract void draw();
15.     public void setAnchor(int x, int y) {
16.         this.x = x;
17.         this.y = y;
18.     }
19. }
and a class Circle that extends and fully implements the Shape class.

Which is correct?
A. Shape s = new Shape();
     s.setAnchor(10,10);
     s.draw();
B. Circle c = new Shape();
     c.setAnchor(10,10);
     c.draw();
C. Shape s = new Circle();
     s.setAnchor(10,10);
     s.draw();
D. Shape s = new Circle();
    s->setAnchor(10,10);
    s->draw();
E. Circle c = new Circle();
    c.Shape.setAnchor(10,10);
    c.Shape.draw();
為何是C?在我猜的答案中就是沒C...


多型

25.
Given:
enum Example { ONE, TWO, THREE }
Which statement is true?
A. The expressions (ONE == ONE) and ONE.equals(ONE) are both guaranteed to be true.
B. The expression (ONE < TWO) is guaranteed to be true and ONE.compareTo(TWO) is guaranteed to be less than one.
C. The Example values cannot be used in a raw java.util.HashMap; instead, the programmer must use a java.util.EnumMap.
D. The Example values can be used in a java.util.SortedSet, but the set will NOT be sorted because enumerated types do NOT implement java.lang.Comparable.
這題我搞不太懂Orz...


121.
 
這題我錯的有點兇@@"


158.
Given:
11. public enum Title {
12.     MR("Mr."), MRS("Mrs."), MS("Ms.");
13.     private final String title;
14.     private Title(String t) { title = t; }
15.     public String format(String last, String first) {
16.         return title + " " + first + " " + last;
17.     }
18. }
19. public static void main(String[] args) {
20.     System.out.println(Title.MR.format("Doe", "John"));
21. }

What is the result?
A. Mr. John Doe
B. An exception is thrown at runtime.
C. Compilation fails because of an error in line 12.
D. Compilation fails because of an error in line 15.
E. Compilation fails because of an error in line 20.
我不懂這題A為何會對?


195.
Which statement is true about the set variable on line 12?
 
A. The set variable contains all six elements from the coll collection, and the order is guaranteed to be
preserved.
B. The set variable contains only three elements from the coll collection, and the order is guaranteed to be
preserved.
C. The set variable contains all six elements from the coll collection, but the order is NOT guaranteed to be
preserved.
D. The set variable contains only three elements from the coll collection, but the order is NOT guaranteed to
be preserved.
我不懂這題為何答案是D而不是B?

以上就這些嘍!感謝大大們的教導^_^

如雲 發表在 痞客邦 留言(9) 人氣()

Close

您尚未登入,將以訪客身份留言。亦可以上方服務帳號登入留言

請輸入暱稱 ( 最多顯示 6 個中文字元 )

請輸入標題 ( 最多顯示 9 個中文字元 )

請輸入內容 ( 最多 140 個中文字元 )

reload

請輸入左方認證碼:

看不懂,換張圖

請輸入驗證碼