ca mock exam combined

38
1112 S.7 CA MOCK EXAM 保留字及函數表 數據庫(SQL 指令-建基於 SQL-92 標準) 類別 指令/常數/函數 常數 FALSE, TRUE 運算符 +, , *, /, >, <, =, >=, <=, <>, %, _, ', AND, NOT, OR SQL ABSOLUTE (ABS), AVG, INT, MAX, MIN, SUM, COUNT ASC, AT, CHAR (CHR), CHAR_LENGTH (LEN), LOWER, TRIM, SPACE, SUBSTRING (SUBSTR/MID), UPPER, VALUE (VAL) DATE, DAY, MONTH, YEAR ADD, ALL, ALTER, ANY, AS, ASC, BETWEEN, BY, CREATE, DELETE, DESC, DISTINCT, DROP, EXISTS, FROM, GROUP, HAVING, IN, INDEX, INNER JOIN, INSERT, INTEGER, INTERSECT, INTO, LEFT [OUTER] JOIN, LIKE, MINUS, NULL, RIGHT [OUTER] JOIN, FULL [OUTER] JOIN, ON, ORDER, SELECT, SET, TABLE, TO, UNION, UNIQUE, UPDATE, VALUES, VIEW, WHERE 電子試算表 類別 指令/常數/函數 常數 FALSE, TRUE 運算符 +, , *, /, >, <, =, >=, <=, <> 函數 ABS, INT, MOD, QUOTIENT, RAND, ROUND, ROUNDUP, ROUNDDOWN, SQRT, TRUNC, AND, NOT, OR CHAR, CODE, CONCATENATE, EXACT, ISBLANK, LEFT, LEN, LOWER, MID, PROPER, RIGHT, TEXT, TRIM, UPPER, VALUE AVERAGE, COUNT, COUNTA, COUNTBLANK, COUNTIF, LARGE, MAX, MIN, RANK, SMALL, SUM, SUMIF, SUMPRODUCT, SUMSQ, FREQUENCY DATE,NOW FIND, HLOOKUP, VLOOKUP, LOOKUP, SEARCH, CHOOSE IF 實體關係圖所採用的符號 意義 符號 意義 符號 實體 一對一關係 屬性 一對多關係 主要屬性 多對多關係 關係 參與限制: 在強制參與一面用 在選擇性參與一面用關係 1 1 關係 1 M 關係 關係 M M 屬性 關係 屬性 實體

Upload: gary-tsang

Post on 18-Dec-2014

1.055 views

Category:

Economy & Finance


4 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Ca mock exam combined

1112 S.7 CA MOCK EXAM

保留字及函數表

數據庫(SQL 指令-建基於 SQL-92 標準)

類別 指令/常數/函數

常數 FALSE, TRUE

運算符 +, , *, /, >, <, =, >=, <=, <>, %, _, ', AND, NOT, OR

SQL ABSOLUTE (ABS), AVG, INT, MAX, MIN, SUM, COUNT

ASC, AT, CHAR (CHR), CHAR_LENGTH (LEN), LOWER, TRIM, SPACE, SUBSTRING

(SUBSTR/MID), UPPER, VALUE (VAL)

DATE, DAY, MONTH, YEAR

ADD, ALL, ALTER, ANY, AS, ASC, BETWEEN, BY, CREATE, DELETE, DESC,

DISTINCT, DROP, EXISTS, FROM, GROUP, HAVING, IN, INDEX, INNER JOIN,

INSERT, INTEGER, INTERSECT, INTO, LEFT [OUTER] JOIN, LIKE, MINUS, NULL,

RIGHT [OUTER] JOIN, FULL [OUTER] JOIN, ON, ORDER, SELECT, SET, TABLE, TO,

UNION, UNIQUE, UPDATE, VALUES, VIEW, WHERE

電子試算表

類別 指令/常數/函數

常數 FALSE, TRUE

運算符 +, , *, /, >, <, =, >=, <=, <>

函數 ABS, INT, MOD, QUOTIENT, RAND, ROUND, ROUNDUP, ROUNDDOWN, SQRT,

TRUNC, AND, NOT, OR

CHAR, CODE, CONCATENATE, EXACT, ISBLANK, LEFT, LEN, LOWER, MID,

PROPER, RIGHT, TEXT, TRIM, UPPER, VALUE

AVERAGE, COUNT, COUNTA, COUNTBLANK, COUNTIF, LARGE, MAX, MIN,

RANK, SMALL, SUM, SUMIF, SUMPRODUCT, SUMSQ, FREQUENCY

DATE,NOW

FIND, HLOOKUP, VLOOKUP, LOOKUP, SEARCH, CHOOSE

IF

實體關係圖所採用的符號

意義 符號 意義 符號

實體

一對一關係

屬性

一對多關係

主要屬性

多對多關係

關係

參與限制:

在強制參與一面用 │

在選擇性參與一面用○

關係 1 1

關係 1 M

關係

關係 M M

屬性

關係

屬性

實體

Page 2: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.2

甲部(40 分)

本部各題均須作答。在本試題答題簿上作答。

1. 小明採用了圖形軟件,在顯示器(VDU)的屏幕上設計了一幅圖畫,如圖 1 所示。

(a) 調節哪項顯示設定可造成如圖 2 的輸出?

(1 分)

小麗是小明的朋友,她利用這套軟件編輯圖 1 的圖畫,並造成如圖 3 的輸出。

(b) (i) 小麗如何將此圖畫造成這樣的輸出?

(ii) 她發覺將圖畫的格式由點陣圖形轉化成向量圖形較為合適。舉出這種做法的兩項潛在

優點。

(4 分)

(c) 小麗將圖 1 和圖 3 兩幅圖畫上載於她的網站。究竟她會否違反版權條例呢?試簡略解釋。

(2 分)

圖 1 圖 2 圖 3

Page 3: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.3

2. 小強利用一文字處理器打入下列段落:

(a) 除了邊界和字型外,他可能使用了不同的格式化功能,試寫出四種。

(2 分)

(b) 小強打入另一段落,其中一句如下所示:

‘His friend told John that this was his thesis.’

他想利用文字處理器內的尋找及取代功能,將整個段落內所有英文詞彙“his”修改為

“her”。

(i) 他是否可以用尋找“is”,而取代它為“er”的方法作修改嗎?試加說明。

(ii) 試描述他如何利用尋找及取代功能,以便有效和快速地作出這項修改。

(3 分)

Department of Computer Engineering

1. Mr Lee and John are working in a

University. Mr Lee is a professor while

John is a research assistant. They have

been working together for more than

two years.

2. Mr Lee and John both

specialize in computer

organization, especially CPU

design.

Page 4: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.4

(c) 在小強所打的段落中,其中一部分描述 John Lee 和 John Woo 兩位人士,內容如下:

Mr Lee and John are working in ABC University. Mr Lee is a professor

while John is a research assistant. They have been working together for

more than two years.

現在小強希望在段落裏作出一些修改:

將‘Mr Lee’修改為‘John Lee’

將‘John’修改為‘John Woo’

試簡略描述小強如何只利用尋找及取代功能,便可做到這些修改。

(2 分)

3. 佩珊和志偉在討論將電腦升級和備份的最佳方法。

(a) 若要增加記憶體來改善處理能力,佩珊提議的優先次序如下:

快取記憶體 > RAM > ROM 硬碟

而志偉提議的優先次序如下:

RAM > 硬碟 > 快取記憶體 > ROM

你會選擇哪一項提議?試舉出兩個理由。

(2 分)

Page 5: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.5

(b) 若要為數儲備份選擇儲存媒體,佩珊提議的優先次序如下:

DVD-R > 記憶卡 > 外置硬碟 > CD-R

而志偉提議的優先次序如下:

外置硬碟 > 記憶卡 > CD-R > DVD-R

你會選擇哪一項提議?試舉出兩個理由。

(2 分)

4. 某快餐店內的電腦互相連接,如下列簡圖所示。顧客需在售票處購買食物,而食物券及其複印

本均同一時間列印出來。顧客可到食物櫃台的不同區域,憑券換取食物。

連接盒 A

數據庫伺服器

食物櫃台

廚房

售票處

打印機

打印機

Page 6: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.6

(a) 試為圖中的網絡設定,舉出兩種適用於「連接盒 A」的網絡設備。而除了價錢外,指出它

們之間的一項分別。

(3 分)

(b) 售票處設有打印機,以列印食物券。什麼類型的打印機最為適用? 試加說明。

(2 分)

(c) 廚師問中會在廚房內輸入一些數據。除了鍵盤和滑鼠外,為廚師建議一個更佳的輸入設

備。試加說明。

(2 分)

(d) 組裝的軟件還是訂做的軟件較適合這間快餐店使用?試舉出所選用的軟件的一個優點和一

個缺點。

(3 分)

Page 7: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.7

5. 志明登記某網站的免費戶口,如下所示:

(a) (i) 採用電郵地址作為登入名稱有什麼好處?

(ii) 志明考慮以 wrgkeran 或 ae5Rln 作為密碼。從保安角度而言,他應該選用哪一個

呢? 試加說明。

(3 分)

志明需要根據以下圖像,輸入有關字符,以完成免費戶口登記。

(b) (i) 這項輸入的目的是什麼?

(ii) 為什麼圖像中字符背後會畫有線條?

(2 分)

輸入驗證碼:

登入名稱(電郵地址):

Page 8: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.8

(c) 最後,志明須按下某對話框內的「同意」按鈕,才可完成這次登記事宜。對話框內的某一

句子是

「若你接受這些條款議議,請按下『同意』按鈕。」

志明使用此網站的免費戶口,可能需要遵守什麼條款協議呢?試舉出兩個例子。

(2 分)

6. 朱小姐利用數據庫表格來儲存 2011 至 2012 年度學生參與課外活動的資料。各項課外活動每年

只舉辦一次。陳小姐利用以下的數據庫設計:

欄名 描述

ActCode 課外活動獨一無二的編號

ActName 課外活動的名稱

StuID 參與此課外活動的學生證號碼

StuName 學生姓名

TelNo 學生的電話號碼

Organizer 顯示學生是否此課外活動的負責人

(a) 表格的關鍵碼應由最少數目的欄組成。試寫出表格的關鍵碼。

(2 分)

(b) 這個數據庫的設計是否符合第二範式(2NF)?試以非關鍵碼欄與關鍵碼欄兩者的相關性來

解答。

(3 分)

Page 9: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.9

乙部(60 分)

全部試題均須回答。在本試題答題簿上作答。

7. 某公司提供網頁設計及網頁寄存服務,其辦公室位於某商業大廈內兩層樓面。公司的網絡結構

如下展示:

公司為顧客製作的網頁,存貯於萬維網伺服器內。每天公司的業務運作由檔案伺服器支援。

(a) (i) 設備 A 是什麼?試加說明。

(ii) 試為設備 B 建議兩類網絡設備,並以其在此網絡中的表現,簡略解釋它們的分別。

(4 分)

一樓

設備 A 集線器

集線器

設備 B

集線器

集線器

萬維網伺服器

檔案伺服器

上司 彼得

約翰 瑪莉

二樓

互聯網

Page 10: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.10

(b) 彼得是該公司的 IT 經理,他打算為該網絡挑選操作系統。

(i) 試寫出該操作系統須包括的兩項必要功能。

(ii) 彼得希望挑選包含一些實用程序的操作系統。試寫出三種不同類型的實用程序。

(iii) 公司的萬維網伺服器需要不斷地從檔案伺服器內的數據庫提取資料。可否在萬維網伺

服器和檔案伺服器上採用不同的操作系統呢?試加說明。

(6 分)

Page 11: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.11

(c) 彼得決定

(1) 加設一項設備以加強網絡保安,及

(2) 取代某些設備以改善網絡流量調配。

然而,他的上司希望保存及使用現有的網絡電線,他也不想改動任何電腦使用者及工作台

的位置。試為彼得繪畫一幅簡單的新網絡結構圖。

(3 分)

唐博士是該公司其中一位顧客,亦是一名出色的科學家,專門研究太陽系。

唐博士發現一顆新恆星,命名為‘4505 Toutatis’。該公司幫助他將下列句子加入了他的網頁底

部。

「‘4505 Toutatis’是一個新發現......」

(d) 數天後,一名學生小芬在一個常用的搜尋器上輸入關鍵字 ‘Toutatis’,以便搜尋有關資料

來完成功課。她會否搜尋到唐博士的網頁呢?試加說明。

(1 分)

Page 12: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.12

(e) 數星期後,唐博士發現瀏覽他的網頁人數沒有明顯增加。

(i) 試舉出兩種不同類型的方法,使能增加唐博士網頁被瀏覽的機會。

(ii) 唐博士更發現某些搜尋器將他的網頁連結置於搜尋結果的頂部,而有些卻把它置於較

後位置。試簡略解釋。

(4 分)

(f) 雖然唐博士可在家裏安裝一台萬維網伺服器,但他還是喜歡使用收費網頁寄存服務。試舉

出兩個理由,以支持唐博士的決定。

(2 分)

Page 13: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.13

8. 某貿易公司利用下列兩個數據庫表格來儲存僱員及部門的資料。

EMP

欄名 類型 欄寬 描述 例子

EmpID 字符 5 僱員編號 E0001

Name 字符 30 僱員姓名 陳大文

Salary 數字 5 僱員月薪 18000

LDate 日期 8 僱員離職日期 (空值)

DeptID 字符 4 偏員的部門編號 D001

ManID 字符 4 僱員的組長的的身分編號 E1000

EMP 儲存公司內所有僱員的資料,包括離職僱員。現職僱員的 LDATE 是空值。而組長的 MANID

是空值。EMPID 是此表格的關鍵欄。

DEPT

欄名 類型 欄寬 描述 例子

DeptID 字符 4 部門編號 D001

DName 字符 20 部門名稱 銷售

DEPT 儲存公司內所有部門的資料。所有部門名稱均是不同的。DEPTID 是此表格的關鍵欄。

試為下列(a)至(e)的任務寫出 SQL 指令。

(a) 列出現職僱員身分編號及姓名,其月薪須介乎 10000 至 20000,包括首尾兩數。

(3 分)

(b) 列出所有部門編號及其部門僱員總人數。

(2 分)

Page 14: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.14

(c) 列出所有部門名稱及其部門僱員的平均月薪。

(3 分)

(d) 列出所有僱員姓名及其組長姓名,並分別以標題「EmployeeName」及「ManagerName」

為首的兩個直行展示。

(4 分)

該公司利用下列數據庫表格儲存每名僱員在 2011 年內的銷售額

SALES

欄名 類型 欄寬 描述 例子

EmpID 字符 5 僱員編號 E0001

Amount 數字 6 銷售額 400000

若僱員在 2011 年裏並沒有任何銷售項目,SALES 內便沒有該名僱員的紀錄。

(e) 列出所有在 2011 年裏沒有任何銷售項目的「銷售」部門僱員的身分編號及姓名。

(4 分)

Page 15: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.15

(f) 根據 EMP 和 SALES 的表格結構,繪畫一個實體關係圖, 以展示僱員與銷售額的關係。

(4 分)

Page 16: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.16

9. 某訓練營的參加者需加入 A、B、C 或 D 其中一個工作坊,以提升技能。現有兩個收集他們選

擇的方法。

方法 1:以網頁輸入表格進行網上登記。

方法 2:下載紙張表格,並以郵政郵件登記。

(a) 哪個方法對訓練營主辦者為佳?試寫出兩個理由。

(2 分)

下列工作表儲存了各參加者的選擇。

A B C D E F G H I

1 姓氏 性別 第一選

第二選

第三選

隨機整

真確 優先權

數值

分配的

工作坊

2 陳 M A B C 124 1 32 A

3 李 F B C D 653 1 193 D

4 張 F C A B 236 1 74 C

5 黃 M C A D 751 1 247 D

… … … … … … … … … …

300 何 F B A C 423 1 145 B

301 互不相

同?

302 工作坊 A B C D TRUE

303 限額 70 100 50 60

304 第一選

擇數目

83 130 62 60 額滿的

工作坊

ABC

主辦者利用內置函數 RAND()向每名參加者分配一個介乎 1 至 999 的隨機整數,包括首尾兩

數。已知 RAND()會返回一個實數,其值大過或等於 0,但小於 1。即 0 RAND() < 1。

Page 17: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.17

(b) (i) 在 F2 輸入一條公式,並複製到 F3 至 F300,這樣便可在欄 F 上產生這些隨機整數。

寫出 F2 的公式。

(ii) 所有隨機整數均須相互不同。在 G2 輸入公式=COUNTIF($F$2:$F$300, F2),並

複製到 G3 至 G300;在 G302 輸入另一條公式,這樣,如果所有隨機整數均是相互

不同,G302 便會展示一個 TRUE 值。試寫出 G302 的公式。

(4 分)

(c) 訓練營主辦者產生了所有相互不同的隨機整數後,便將此工作表內所有數值複製到另一張

新工作表,並在此新工作表而非原有的工作表上繼續工作。為什麼他必須這樣做?

(2 分)

假設有 299 位參加者。根據所分配的隨機整數,每位參加者均獲發一個介乎 1 至 299 的優先

權數值。若隨機整數較小,其優先權數值也是較小的,表示這位參加者可較優先選擇工作坊。

(d) 在 H2 輸入一條公式,並複製到的至 H300 便可產生欄 H 內的優先權數值。試寫出 H2 的

公式。

(2 分)

B303 至 E303 儲存了各工作坊的限額,而的 B304 至 E304 儲存了以各工作坊作為第一選擇

的人數。

(e) 在 G304 輸入一條公式,以顯示工作坊名稱,其第一選擇人數是超出或等於本身限額的。

試寫出 G304 的公式。

(2 分)

Page 18: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.18

下列描述分配工作坊程序 P1、P2 和 P3:

P1: 根據參加者的第一選擇及其優先權數值分配工作坊 A/B/C/D,直至該工作坊的限額爆

滿或所有參加者均獲分配。

P2: 根據尚未分配參加者的第二選擇及其優先權數值分配工作坊 A/B/C/D,直至該工作坊

的限額爆滿或所有參加者均獲分配。

P3: 其餘的參加者以其第三選擇獲給分配。

(f) 工作坊的分配工作以試算表的排序及篩選功能完成。

(i) 寫出下列 P1 未完成的步驟,以便分配參加者到工作坊 A。

步驟 1:

步驟 2:

步驟 3:

在欄 I 的首個儲存格填上「A」,然後拖曳並填滿往下的儲存格,直至填滿

工作坊 A 的限額為止。

(ii) 假設 P1 完成了。試寫出下列 P2 未完成的步驟,以便分配參加者到工作坊 B。

步驟 1:

步驟 2:

步驟 3:

在欄 I 的首個儲存格填上「B」,然後拖曳並填滿往下的儲存格,直至填滿

工作坊 B 的限額為止。

(iii) 試描述如何找出獲分配工作坊 B 的男性參加者的總人數。

(6 分)

Page 19: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.19

(g) 每名參加者均獲發一張有關分配工作坊結果的回條,部分回條如下所示。

黃先生:

工作坊是 D。

張小姐:

工作坊是 C。

試描述如何利用文字處理器的郵件合併功能製作這些回條。

(2 分)

全卷完

Page 20: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.20

Reserved Words and Functions

Database (SQL commands - Based on SQL-92 Standard)

Type Commands/constants/functions

Constants FALSE, TRUE

Operators +, , *, /, >, <, =, >=, <=, <>, %, _, ', AND, NOT, OR

SQL ABSOLUTE (ABS), AVG, INT, MAX, MIN, SUM, COUNT

ASC, AT, CHAR (CHR), CHAR_LENGTH (LEN), LOWER, TRIM, SPACE,

SUBSTRING (SUBSTR/MID), UPPER, VALUE (VAL)

DATE, DAY, MONTH, YEAR

ADD, ALL, ALTER, ANY, AS, ASC, BETWEEN, BY, CREATE, DELETE, DESC,

DISTINCT, DROP, EXISTS, FROM, GROUP, HAVING, IN, INDEX, INNER JOIN,

INSERT, INTEGER, INTERSECT, INTO, LEFT [OUTER] JOIN, LIKE, MINUS, NULL,

RIGHT [OUTER] JOIN, FULL [OUTER] JOIN, ON, ORDER, SELECT, SET, TABLE,

TO, UNION, UNIQUE, UPDATE, VALUES, VIEW, WHERE

Electronic Spreadsheet

Type Commands/constants/functions

Constants FALSE, TRUE

Operators +, , *, /, >, <, =, >=, <=, <>

Functions ABS, INT, MOD, QUOTIENT, RAND, ROUND, ROUNDUP, ROUNDDOWN, SQRT,

TRUNC, AND, NOT, OR

CHAR, CODE, CONCATENATE, EXACT, ISBLANK, LEFT, LEN, LOWER, MID,

PROPER, RIGHT, TEXT, TRIM, UPPER, VALUE

AVERAGE, COUNT, COUNTA, COUNTBLANK, COUNTIF, LARGE, MAX, MIN,

RANK, SMALL, SUM, SUMIF, SUMPRODUCT, SUMSQ, FREQUENCY

DATE,NOW

FIND, HLOOKUP, VLOOKUP, LOOKUP, SEARCH, CHOOSE

IF

Symbols Used in Entity-Relationship Diagrams

Meaning Symbol Meaning Symbol

Entity

One-to-One Relationship

Attribute

One-to-Many Relationship

Key

Attribute

Many-to-Many Relationship

Relationship

Participation constraints:

Use │ on Mandatory side

Use ○ on Optional side

Attribute

1 1

Relationship

1 MRelationship

Relationship

M MRelationship

Relationship

Attribute

Entity

Page 21: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.21

Section A (40 Marks)

Answer ALL questions in this section. Write your answers in the space provided in this

question-answer book.

1. Paul uses graphics software to create a picture on the screen of his visual display unit (VDU) as

shown in Figure l.

(a) Which display setting can be adjusted to produce the output shown in Figure 2?

(1 mark)

Cindy, Paul’s friend, uses the software to edit the picture in Figure 1 and produces the output shown

in Figure 3.

(b) (i) What has Cindy done to the picture to produce the output?

(ii) She finds that it is better to convert the format of the picture from bit-mapped graphics into

vector graphics. Give two potential advantages of doing this.

(4 marks)

(c) Cindy uploads both the pictures in Figure 1 and Figure 3 onto her web site. Will she violate

copyright law? Explain briefly.

(2 marks)

Figure 1 Figure 2 Figure 3

Page 22: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.22

2. Alan types in the following passage using a word processor:

(a) Other than margin and font, give four different formatting features that he may use.

(2 marks)

(b) Alan types another passage and one of the sentences is shown below:

‘His friend told John that this was his thesis.’

He wants to use the search and replace function in the word processor to change all the words

‘his’ into ‘her’ in the whole passage.

(i) Can he make the change by searching ‘is’ and replacing it with ‘er’? Justify your answer.

(ii) Describe how he can use the search and replace function to make the change effectively

and efficiently.

(3 marks)

Department of Computer Engineering

1. Mr Lee and John are working in a

University. Mr Lee is a professor while

John is a research assistant. They have

been working together for more than

two years.

2. Mr Lee and John both

specialize in computer

organization, especially CPU

design.

Page 23: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.23

(c) Part of Alan’s passage describing John Lee and John Woo is shown in the following box:

Mr Lee and John are working in ABC University. Mr Lee is a professor

while John is a research assistant. They have been working together for

more than two years.

Now Alan wants to make some changes in the passage:

Change ‘Mr Lee’ into ‘John Lee’

Change ‘John’ into ‘John Woo’

Describe briefly how Alan can do it by only using the search and replace function.

(2 marks)

3. Jane and Tom discuss the best ways to upgrade and back up their computers.

(a) To increase the memory size in order to speed up processing capacity, Jane suggests that the

priority should be

Cache Memory > RAM > ROM > Hard Disk

while Tom suggests

RAM > Hard Disk > Cache Memory > ROM

Which suggestion do you prefer? Give two reasons.

(2 marks)

Page 24: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.24

(b) To select storage media for the data backup, Jane suggests that the priority should be

DVD-R > Memory Card > External Hard Disk > CD-R

while Tom suggests

External Hard Disk > Memory Card > CD-R > DVD-R

Which suggestion do you prefer? Give two reasons.

(2 marks)

4. The interconnection of computers in a fast food shop is shown in the following simple diagram.

Customers order food at the cashier. Tickets and their duplicates are printed at the same time. The

customers can then collect the food at different sections of the food counter by presenting the tickets.

Connect Box A

Database Server

Food Counter

Kitchen

Cashier

Printer

Printer

Page 25: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.25

(a) For the networking setup drawn in the diagram, give two kinds of networking devices that you

may use in Connect Box A. Also, other than cost, state one difference between them.

(3 marks)

(b) Printers are attached to the cashiers for printing tickets. What kind of printer should be used?

Justify your answer.

(2 marks)

(c) The cook in the kitchen enters some data occasionally. Other than a keyboard and a mouse,

suggest a better input device for the cook. Justify your answer.

(2 marks)

(d) Will packaged software or custom-made software be more suitable for this fast food shop? Give

one advantage and one disadvantage of your choice.

(3 marks)

Page 26: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.26

5. Peter registers for a free account on a web site, as shown below:

(a) (i) What is the benefit of using an email address as login name?

(ii) Peter wants to use either wrgkeran or ae5Rln as his password. Which one should he

use in terms of security? Justify your answer.

(3 marks)

In order to complete the registration of the free account, Peter needs to input certain characters based

on the following image.

(b) (i) What is the purpose of this input?

(ii) Why there is a line on the background of the characters?

(2 marks)

Input verification code:

Login name (email address):

Page 27: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.27

(c) Finally, Peter has to click the ‘I agree’ button in a dialog box to complete the registration. A

sentence in the dialog box is

“By clicking the ‘I agree’ button below, you agree to the terms of the agreement.”

What terms of the agreement for the free web account might Peter need to agree to? Give two

examples.

(2 marks)

6. Ms Chu uses database table to record student participation in school activities in the school year

2011-2012. Each activity is held only once a year. There are two possible database designs for

storing the information, as follows:

Field Name Description

ActCode Unique code of activity

ActName Name of activity

StuID Identify code of students who participates in the activity

StuName Student’s name

TelNo Student’s telephone number

Organizer Indicates whether student is an organizer of the activity

(a) A key of a table should be composed of a minimum number of field(s) . State the key of the

table.

(2 marks)

(b) Is this design in Second Normal Form (2NF)? Explain your answer by considering the

dependency of non-key fields and key fields.

(3 marks)

Page 28: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.28

Section B (60 Marks)

Answer ALL questions in this section. Write your answers in the space provided in this

question-answer book.

7. A company provides web page design and web hosting services and its office is located on two

different floors of a commercial building. Its network infrastructure is shown below:

The web server stores the web pages produced by the company for their customers. The file server

supports the daily business needs.

(a) (i) What is Device A? Justify your answer.

(ii) Suggest two types of network devices that can be used for Device B. Explain briefly their

difference, in terms of the performance in this network.

(4 marks)

Device A Hub

Hub

Device B

Hub

Hub

Web Server

File Server

Boss Peter

John Mary

Level 2

Internet

… Level 2

Page 29: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.29

(b) Peter, the IT manager of the company, is going to choose operating systems for the network.

(i) Give two essential functions that the operating systems should include.

(ii) Peter would like to choose an operating system which will be bundled with some utility

programs. Give three different types of utility programs.

(iii) The web server constantly needs to retrieve information from the database in the file server.

Can the web server and the file server run on different operating system? Justtify your

answer.

(6 marks)

Page 30: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.30

(c) Peter decides to

(1) add a device for better network security, and

(2) replace certain devices for better network traffic arrangement.

However, his boss wants to keep and use the current network cabling and he does not want to

move any user or workstation. Draw a simple diagram of the new network infrastructure for

Peter.

(3 marks)

Dr. Tong, one of the customers of the company, is a famous scientist who specializes in the Solar

System.

Dr. Tong discovered a new star, which was named ‘4505 Toutatis’. The company added the

following statement onto the bottom of his home page for him:

“ ‘4505 Toutatis’ is a new discovery...”

(d) A few days later, Alice, a student, enters the keyword, ‘Toutatis’, to search for materials for her

homework through a popular search engine. Will she find Dr. Tong’s home page? Justify your

answer.

(1 marks)

Page 31: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.31

(e) Several weeks later, Dr. Tong finds that there is no significant increase in visits to his

homepage.

(i) Suggest two different types of method that can improve the chances of Dr. Tong’s home

page being visited.

(ii) Dr. Tong also finds that certain search engines put the link to his home page at the top of

the search result, while some others put it at the bottom. Explain briefly.

(4 marks)

(f) Although Dr. Tong can set up a web server at home, he prefers to pay for web hosting services.

Give two reasons to support Dr. Tong’s decision.

(2 marks)

Page 32: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.32

[2008 Q8]

8. A trading company uses the following two database tables to store information about employees and

departments.

EMP

Field Name Type Width Description Example

EMPID Character 5 Identity code of the employee E0001

Name Character 30 Employee’s name Chris Chan

SALARY Numeric 5 Employee’s monthly salary 18000

LDATE Date 8 Departure date that the employee left the

company

(NULL)

DEPTID Character 4 Identity code of the department of the

employee

D001

MANID Character 4 Identity code of the manager of the

employee

E1000

EMP stores information on all employees of the company including those who have resigned. LDATE

will be null for existing employees; MANID will be null for managers. EMPID is the key field of this

table.

DEPT

Field Name Type Width Description Example

DEPTID Character 4 Identity code of the department D001

DNAME Character 20 Department name Sales

DEPT stores information on all departments of the company. All department names are unique.

DEPTID is the key field of this table.

Write SQL commands to complete the tasks in (a) to (e):

(a) List the identity codes and names of those current employees with monthly salary between

10000 and 20000 inclusively .

(3 marks)

Page 33: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.33

(b) List all the identity codes of departments and the corresponding total numbers of employees.

(2 marks)

(c) List all the department names and the corresponding average monthly salaries of employees.

(3 marks)

(d) List all the names of the employees together with the names of their managers. The output

should be in two columns with headings ‘EmployeeName’ and ‘ManagerName’.

(4 marks)

The company uses the following database table to store the sales amount in 2011 for each employee.

SALES

Field Name Type Width Description Example

EmpID Character 5 Identify code of the employee E0001

Amount Numeric 6 Sales amount 400000

If an employee did not sell anything in 2011, there will be no record for the employee in SALES.

Page 34: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.34

(e) List all the identity codes and names of the employees who did not sell anything in 2007 and

came from the department ‘SALES’

(4 marks)

(f) Base on the table structure of EMP and SALES, drawan entity-relationship diagram to illustrate

the relationship between employees and sales amounts.

(4 marks)

Page 35: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.35

9. Participants in a training camp need to enroll in one of the four workshops, A, B, C or D, for skill

training. There are two methods of collecting their choices.

Method 1: A web page entry form for online registration

Method 2: A paper form for download and registration by postal mail

(a) For the training camp organizer, which method is better? Give two reasons.

(2 marks)

The choices of participants are stored in the following worksheet.

A B C D E F G H I

1 Last Name Sex First

choice

Second

choice

Third

choice

Random

integer

Valid Priority

number

Assigned

workshop

2 Chan M A B C 124 1 32 A

3 Lee F B C D 653 1 193 D

4 Cheung F C A B 236 1 74 C

5 Wong M C A D 751 1 247 D

… … … … … … … … … …

300 Ho F B A C 423 1 145 B

301 Distinct?

302 Workshop A B C D TRUE

303 Quota 70 100 50 60

304 Count of

First choice

83 130 62 60 Workshop

full

ABC

The organizer assigns a random integer between 1 and 999 inclusive to each participant using a

build-in function RAND(). Given that RAND() returns a real number equal to or greater than 0 and

less than 1, i.e. 0 RAND() < 1.

Page 36: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.36

(b) (i) A formula is entered into F2 and then copied into F3 to F300, so that the random integers

in Column F can be generated. Write down the formula in F2.

(ii) All random integers should be distinct. A formula=COUNTIF($F$2:$F$300, F2) is

entered into G2 and then copied into G3 to G300. Another formula is entered into G302,

so that a TRUE value will be shown in G302 if all the random integers are distinct. Write

down the formula in G302.

(4 marks)

(c) After generating all distinct random integers, the training camp organizer copies all the values

in this worksheet into a new worksheet. He then works on this new worksheet instead of the

original worksheet. Why must he do this?

(5 marks)

Suppose that there are 299 participants. A priority number from 1 to 299 is assigned to each

participant according to the random integers generated. If the random integer is smaller, the priority

number is smaller, which means this participant can choose the workshop earlier.

(d) A formula is entered into H2 , and then copied into H3 to H300, so that the priority numbers

can be generated in Column H. Write down the formula in H2.

(2 marks)

Page 37: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.37

The quotas of the workshops are stored in B303 to E303 and the counts of first choice for the

respective workshops are storied in B304 to E304 .

(e) A formula is entered into G304 to display the workshop names in which the number of first

choices is greater than or equal to the quota. Write down the formula in G304.

(2 marks)

The workshop allocation procedures P1, P2 and P3 are described as follows:

P1: Assign workshops A/B/C/D to the participants according to their first choices and priority

numbers, until the quota of the workshop is exceeded or all the participants are assigned.

P2: Assign workshops A/B/C/D to those participants still not yet assigned according to their

second choices and priority numbers, until the quota of the workshop is exceeded or all the

participants are assigned.

P3: The rest of the participants will be assigned according to their third choices.

(f) The workshop allocation is completed using the sorting and filtering features ofthe spreadsheet.

(i) Complete the following missing steps of P1 to assign participants to Workshop A.

Step 1:

Step 2:

Step 3:

Assign ‘A’ to the first cell in Column I and then drag it and fill the cells

downward until the quota of Workshop A is reached.

(ii) Assume that P1 is completed. Complete the following missing steps of P2 to assign

participants to Workshop B.

Step 1:

Step 2:

Step 3

Assign ‘B’ to the first cell in Column 1 and then drag it and fill the cells

downward until the quota of Workshop B is reached.

Page 38: Ca mock exam combined

1112 S.7 CA MOCK EXAM P.38

(iii) Describe how to find the total number of male participants who are assigned to Workshop

B.

(2 marks)

(g) A reply slip is sent to each participant telling them the result of the workshop allocation. Some

of the slips are shown below:

Mr Wong,

The workshop is D.

Ms Cheung,

The workshop is C.

Describe how to use the mail merge function of a word processor to produce the slips.

(2 marks)

END OF PAPER