104年 中鋼、中鋼鋁業 師級 資訊管理 JAVA程式設計、軟體工程概論、關聯式資料庫的應用 試卷

pdf
487.03 KB
12 頁
Guest
侵權投訴
加載中. ..
PDF
1頁,共 12
中國鋼鐵股份有限公司 104 年新進人員甄()試題
甄試職位/類組【代碼:師級職位/資訊系統設計H9608
專業科目:1. JAVA 程式設計 2.軟體工程概論 3.關聯式資料庫的應用
*請填寫入場通知書編號:________________
注意:作答前須檢查答案卡、入場通知書號碼、座位標籤號碼、甄試類別是否相符,如有不同應立即請監試人
員處理,否則不予計分
本試卷一份共 12 測驗題型為【四選一單選選擇題 30 每題 1.5 分,複選題 22 每題 2.5 分】
限用 2B 鉛筆在「答案卡」上作答,請選出最適當答案,全部答對才給分答錯不倒扣;未作答者,不
予計分。
請勿於答案卡上書寫姓名、入場通知書號碼或與答案無關之任何文字或符號。
本項測驗僅得使用簡易型電子計算器(不具任何財務函數、工程函數功能、儲存程式功能),但不得發出
聲響;若應考人於測驗時將不符規定之電子計算器放置於桌面或使用,經勸阻無效,仍執意使用者
節以零分計;該電子計算器並由監試人員保管至該節測驗結束後歸還。
答案卡務必繳回,未繳回者該科以零分計算。
壹、四選一單選選擇題 30 題(每題 1.5 分,答錯不倒扣;未作答者,不予計分)
41.編譯並執行下面的程式時,會有何結果?
public class testType {
public static void main(String[] args){
int i=3,c=0;
float f=3.0;
double d=1.9;
if(i==f)c++;
if((int)(f+d)==(int)f+(int)d)c++;
System.out.println(c);
}
}
0
1
2
程式編譯時發生錯誤
2頁,共 12
32.編譯並執行下面的程式時,輸出結果為何
public class Polymorphism {
public static void main(String[] args) {
m(new GraduateStudent());
m(new Student());
m(new Person());
}
public static void m(Object x) {
System.out.println( x.toString());
}
}
class GraduateStudent extends Student {
}
class Student extends Person {
public String toString() {
return "01.Student";
}
}
class Person extends Object {
public String toString() {
return "02.Person";
}
}
01.Student
02.Person
01.Student
02.Person
01.Student
01.Student
02.Person
01.Student
02.Person
3頁,共 12
23.編譯並執行下面的程式時,輸出結果為何
public class testArray{
public static void main(String args[])
{
char[] ary1={'T','h','e','J','a','v','a','2'};
char[] ary2={'H','e','l','l','o',' ','T','i','m','e','!'};
System.arraycopy(ary1,3,ary2,6,4);
for(char element : ary2)
System.out.print(element);
}
}
Java2 Time
Hello Java!
Hello Java2
The Time!
24.下列程式中 a*b 的計算結果的資料型態為何?
int a = 5; double b = 3.14;
System.out.println(a*b);
int
double
float
byte
4頁,共 12
45.執行下列程式片段,輸出結果為何?
public class testContinue {
public static void main(String[] args) {
back1:
for(int i = 0; i < 10; i++){
back2:
for(int j = 0; j < 10; j++) {
if(j == 9) {
continue back1;
}
}
System.out.print("test");
}
}
}
test
test test test test test test test test test test
test test test test test test test test test
沒有字串被輸
16.編譯並執行下列的程式時,輸出結果為何?
public class testHello {
public static void main(String[] args){
boolean b=false;
if(b=true)
System.out.println("您好");
else
System.out.println("再見");
}
}
您好
再見
沒有字串被輸
程式編譯時發生錯誤
5頁,共 12
27.編譯並執行下列的程式時,輸出結果為何
public static void main(String[] args) {
// Declare and initialize variables
int num1 = 1;
int num2 = 2;
System.out.println("Before invoking the swap method, num1 is " +
num1 + " and num2 is " + num2);
// Invoke the swap method to attempt to swap two variables
swap(num1, num2);
System.out.println("After invoking the swap method, num1 is " +
num1 + " and num2 is " + num2);
}
/** Swap two variables */
public static void swap(int n1, int n2) {
System.out.println("tInside the swap method");
System.out.println("ttBefore swapping n1 is " + n1 + " n2 is " + n2);
// Swap n1 with n2
int temp = n1;
n1 = n2;
n2 = temp;
System.out.println("ttAfter swapping n1 is " + n1 + " n2 is " + n2);
}
Before invoking the swap method, num1 is 1 and num2 is 2
Before swapping n1 is 1 n2 is 2
After swapping n1 is 2 n2 is 1
After invoking the swap method, num1 is 1 and num2 is 2
Before invoking the swap method, num1 is 1 and num2 is 2
Inside the swap method
Before swapping n1 is 1 n2 is 2
After swapping n1 is 2 n2 is 1
After invoking the swap method, num1 is 1 and num2 is 2
Before invoking the swap method, num1 is 1 and num2 is 2
Before swapping n1 is 1 n2 is 2
After swapping n1 is 1 n2 is 2
Inside the swap method
After invoking the swap method, num1 is 1 and num2 is 2
Before invoking the swap method, num1 is 1 and num2 is 2
Before swapping n1 is 1 n2 is 2
After invoking the swap method, num1 is 1 and num2 is 2
6頁,共 12
18.執行下列程式片段,輸出結果為何?
public class testVariable {
private static int i=0;
private static int j=0;
public static void main(String[] args) {
int i=2;
int k=3;
{
int j=3;
System.out.println("i + j is "+i+j);
}
k=i+j;
System.out.println("k is "+k);
System.out.println("j is "+j);
}
}
i + j is 23 i + j is 5 i + j is 5 i + j is 23
k is 2 k is 3 k is 2 k is 5
j is 0 j is 3 j is 0 j is 0
49.編譯並執行下面的程式時,輸出結果為何
public class testSwitch {
public static void main(String args[])
{
int x = 3, y = 3;
switch(x+3){
case 6: y=1;
default: y+=1;
}
System.out.println(y);
}
}
5 4 3 2
310.Java 的敘述,下列何者正確?
個子類可父類可以有多
個子類可父類只可以有
個子類只個父類可以有
個子類只個父類也只能
7頁,共 12
211.下列何者為程式執行後的輸出結果?
public static void main(String args[])
{
int i = 1;
do {
int num = 1;
for (int j =1; j <= i; j++){
System.out.print(num + "G");
num += 2;
}
System.out.print(" , ");
i++;
} while (i <= 3);
}
1G , 1G3G , 1G3G5G 1G , 1G3G , 1G3G5G , 1G , 3G , 5G 1G , 3G , 5G ,
412.於一軟體專案若使用某軟體組件 30%的機會難以整合因重做(rework)及延誤將額外耗資 300,000
元;但有 40%的機會,可節省 600,000 元勞力(effort)花費,請算出使用此軟體組件之風險期望貨幣(expected
monetary value, EMV)
600,000 330,000 280,000 150,000
313.根據 Putnam-Norden-Rayleigh (PNR)曲線軟體專案花費之勞力(effort, E)與專案交付時間 t間之關係為何?
E t2成反比 E t3成反比 E t4成反比 E t5成反比
114.某軟體專案總預算為 550,000 ,根據時程安排,專案現應已完成 55%的工作。但在目前狀態會議中,
案團隊報告,實際上完 45%的工作,且至目前為止已花費 200,000 ,該如何描述此專案現況
該專案花費在預算範圍內,而時程落後 該專案花費超出預算範圍,且時程落後
該專案花費超出預算範圍,而時程超前 該專案花費在預算範圍內,而時程超前
315.階段式(staged)能力成熟度模型整合(Capability Maturity Model Integration, CMMI)共分成幾個成熟等級?
3 4 5 6
316.軟體專案團隊共有 8名成員,成員間需相互溝通。請問共有多少對兩兩溝通情形?
8 7 28 56
317.下列何者並非避免建立不良使用者介面之良好措施?
請教使用者介面專家之意見
建立雛形(prototype)
限制使用者要求定製(customize)之功能數量,以盡量減少介面數
徵詢使用者之意見
318.下列哪個元件不屬於軟體需求分析模型
情境式模型(scenario-based model) 行為模型(behavioral model)
瀑布式模型(waterfall model) 類別模型(class model)
8頁,共 12
219.若公司與系統維護廠商簽訂之契約中規定系統可用率(availability)每年不得低於 99%,則於 1年中,公司
系統當機累積時間最高可達多久,而仍能符合契約中對系統可用率之規定
56 小時 87 小時 92 小時 104 小時
320.公司與系統維護廠商簽訂之契約中規定系統可用率(availability)每年不得低於 99.5%超過時當機第 1
時,罰款 1,000 元,其後持續每小時倍增(2小時罰款 2,000 、第 3小時罰款 4,000 元、 4小時罰款 8,000
元、…),不滿 1小時進位為整數小時。假設於 1年中,公司系統當機累積時間為 50 小時,則系統維護廠商最
多可能被罰多少元?
7,000 32,000 64,000 128,000
321.設計應用軟體之優良使用者介面(user interface design)之要求,最不可能包含下列哪一項?
降低使用者的記憶負擔
讓使用者能經由使用者介面掌控應用軟
使用單機版應用軟體時,電腦必須連線,才可開啟使用者介面
讓使用者介面能盡量一致化
122.下表滿足資料庫第幾正規化?
課程名稱
課程 ID
學費
學生
郵遞區號
地址
聯絡電話
PMP
1
52,000
王一
231
新北市
02-22312200
PMA
2
43,000
陳二
801
高雄市
0900123456
PMA
2
43,000
楊三
802
高雄市
0901234567
第一正規化 第二正規化 第三正規化 BCNF
323.資料庫查詢過程中,僅顯示含有特殊字樣的所有資料時,可使用下列何項?
GROUP BY ORDER BY LIKE TOP 10
424.已建立的資料表中,如欲增加一項資料欄位,可使用下列何項語法?
ADD TABLE (Char name) CHANGE TABLE ADD(Char name)
MODIFY TABLE ADD(Char name) ALTER TABLE ADD(Char name)
325.文具行供應商 SupA SupB 兩家,某天老闆於資料庫執行下列陳述式,請問其結果為何?
SELECT Product
FROM SupA
WHERE NOT EXISTS
(SELECT Product
FROM SupB
WHERE SupA.Product = SupB.Product )
顯示供應商 A的所有產品
顯示供應商 A沒有的產品,而供應商 B的產品
顯示供應商 B有的產品,而供應商 A的產品
顯示供應商 A與供應商 B的所有產品
426.書局銷售各式各樣的文具但每項文具並非同一家供應商提供請問文具實體與供應商實體間的關聯為何?
1 對多 1 1
多對 1 多對多
9頁,共 12
127.有關關聯式資料庫,下列敘述何者錯誤?
一個資料表只能有一個外來鍵
外來鍵會必定會參照到其他資料表主鍵
外來鍵內含值可為 NULL
主要作用為維護資料表之間資料的一致
328.下列哪一項運算,不是關聯式模式中的關聯式代數原始運算子?
差集運算(Difference)
乘積運算(Cartesian)
除法運算(Divide)
聯集運算(Union)
129.資料庫中,若我們要去除掉相同資料,讓相同資料只留下一筆,可使用下列何種 SQL 語法
Distinct Having
Count Like
330.資料庫系統設計包含 A:需求分析、B實體設計、C:邏輯設計D:概念設計、E:系統實作,請選出
設計程序應為下列何者
ABCDE DCABE
ADCBE DACBE
貳、複選題 22 題(每題 2.5 分,全部答對才給分,答錯不倒扣;未作答者,不予計分)
1,2,3,431.執行下列程式後,哪些選項出現在輸出之內容中?
public static void main(String args[])
{
int x=10,y=20;
boolean a=true,b=false;
System.out.println("x!=y ==> " + (x!=y));
System.out.println("a nand (x>y) ==> " + !(a && (x>y)));
System.out.println("a nor b ==> " + !(a || b));
System.out.println("a nor (x=> " + !(a || (x
}
x!=y ==> true a nand (x>y) ==> true
a nor b ==> false a nor (x<y) ==> false
2,3,432.JAVA 中註解,可使用下列哪些項目表示?
/*…/* /*…*/
//… /**…*/
10頁,共 12
2,333.編譯並執行下面的程式時,下列何者為輸出結果之一?
public class testPrint {
public static void main(String args[])
{
System.out.println("01." +"Hi, ABC, good".matches(".*ABC.* "));
System.out.println("02." +"A,B;C".replaceAll(",;", "#"));
System.out.println("03." +"A,B;C".replaceAll("[,;]", "#"));
String[] tokens = "Apple,Boy;Cat".split("[,;]");
for (int i = 0; i< tokens.length; i++)
System.out.print("04." +tokens[i] + " ");
}
}
01.true 02.A,B;C
03.A#B#C 04.Cat
1,434.下列變數名稱,何者可正常執行?
$NT
@value
500kg
UserNames
2,335.下列 JAVA 的資料型態中,何者大於 6byte
int
long
double
float
1,2,436.若要成功輸 ABCDEF,下列程式中底線部分可填入哪些選項?
public class TestABCDEF {
public static void main (String args[]) {
System.out. ("ABCDEF");
}
}
print println
printt printf
11頁,共 12
2,437.編譯並執行下列的程式時,哪些選項會出現在輸出之內容中?
public class testS1S2 {
public static void main(String args[])
{
short a=50;
int b=100;
float d=1.2f;
double e=2.5d;
String s1,s2;
s1=String.valueOf(a+b)+String.valueOf(a)+String.valueOf(b);
s2=Float.toString(d)+Double.toString(e);
System.out.println("s1 = " + s1);
System.out.println("s2 = " + s2);
}
}
s1 = 150 s1 = 15050100 s2 = 3.6 s2 = 1.22.5
1, 3,438.有關 break continue 的敘述,下列何者正確?
break 可以離開目前 switchforwhiledo while 的區塊,並前進至區塊後下一個陳述句
continue 只會結束接下來區塊中的陳述句,並跳回 switchforwhiledo while 迴圈區塊的開頭繼續下一
迴圈,而不是離開迴圈
break 可以搭配標籤(Label)來使用,藉由設定標籤區塊,break 不僅是離開迴圈,而是離開整個標籤區塊的範
(Scope)而繼續往下執行
continue 可以搭配標(Label)來使用標籤設定 for 迴圈之前 continue 該行之後會回到指定標籤處的
for 迴圈重新執行循環
3,439.軟體專案之目前狀態為:原規劃 5000 小時,目前實獲(earn)4500 小時,並已花 4800 小時。請問下列
何者正確?
時程績效指數(schedule performance index, SPI)=1.11
專案花費未超出原規劃,但期程落後
成本績效指數(cost performance index, CPI) =0.9375
專案期程落後,且花費超出原規劃
1,340.目前專案之狀態為:原規劃 5500 小時,目前實獲(earn)5700 小時,並已花了 6000 小時。請問下列何者
正確?
時程變異(schedule variance, SV) =200 時程變異(schedule variance, SV) = -200
成本變異(cost variance, CV) = -300 成本變異(cost variance, CV) =300
1,441.有關模組(module)間及模組內之功能相依(functional independence)的敘述,下列何者正確?
模組內之聚合(cohesion)越強越好 模組間之聚合力(cohesion)越強越好
模組內之耦合(coupling)越弱越好 模組間之耦合(coupling)越弱越好
12頁,共 12
1,2,442.下列何者屬於對軟體之壓力測試(stress testing)
執行需大量記憶體之測試案例(test cases) 輸入比正常情形多數倍之資料
用力敲擊鍵盤 執行需大量存取資料庫資料之測試案例
1,2,443.下列哪些屬於合理之軟體除錯策略(debug strategy)
盡力而為(brute force) 反向追蹤(backtracking)
開除程式設計(fire programmer) 原因消除法(cause elimination)
一律給分44.下表顯示某專案之各項活動持續時間及其相互關係,則下列敘述何者正確?
活動
持續時間(工作日)
直接先行活動
A
3
--
B
2
--
C
5
A
D
4
C
E
2
C
F
7
B, D
G
2
D,E, F
此專案最快需 17 個工作日完成
活動 D最多可延 4個工作日,而不會延誤專案完成時程
活動 E最多可延 5個工作日,而不會延誤專案完成時程
若活動 F縮短 3個工作日,則此專案最快需花 14 個工作日完成
2,445.有關軟體測試之敘述,下列何者正確?
功能測試一般屬於白箱(white box)測試
回歸(regression)試可用以測試軟體新增部分對既有軟體之影響
驗核(validation)係指是否正確的建立產品(Are we building the product right)”
驗核(validation)係指是否建立正確的產品(Are we building the right product)”
1,346.優良的使用案(use case)具有下列哪些性質?
使用案例結束於系統對行為者(actor)所有要求皆已產生答案
使用案例由系統對行為者(actor)之請求開
使用案例由行為者(actor)之觀點撰
使用案例描述對行為者(actor)所有要求產生答案之所有系統內部活動
1,347.請選出下列屬於資料定義語言(Data Definition Language, DDL)的關鍵字?
ALTER UPDATE DROP INSERT
3,448.有關資料庫交易特性 ACID 所代表的詞彙,下列何者正確?
Automatically Confidentiality Isolation Durability
1,449.資料庫在進行交易處理時,一般會採用並行控制(Concurrency Control),下列何者為並行控制目的?
交易的孤立性(Isolation) 避免死結發生 增加交易回應時間 提高交易產出量
1,2,450.下列何者是滿足死結(Deadlock)條件?
把持且等待 互斥 資源可搶奪 循環等待
2,451.下列何者為資料控制語言的指令?
SELECT COMMIT COUNT GRANT
1,2,452.若資料關係為多對多,適合使用下列哪些資料庫模型存放?
物件導向式 關聯式 階層式 網狀式
收藏 ⬇️ 下載