S.3 Computer Literacy (2011-2012)

Practical Test (Second Test)

Access Application – Set A [30M]

There are many textbooks in the school library. Some book data are shown below:

Name: Chinese Language
ISBN: 978-0195962666
Publisher: Keys Chinese
IsArts: Yes / Name: A-Level Biology
ISBN: 962!9906368
Publisher: Manhattan
IsArts: No
Name: English Language
ISBN: 962-3043937
Publisher: Witman
IsArts: Yes / Name: Interactive Geography
ISBN: 962-4697000
Publisher: Aristo
IsArts: Yes
Name: Information Technology
ISBN: 978!9880033902
Publisher: Longman
IsArts: No / Name: Chinese Literature
ISBN: 962-0404696
Publisher: China Book
IsArts: Yes
Name: Physics in life
ISBN: 978-0000040633
Publisher: Longman
IsArts: No / Name: New Way Chemistry
ISBN: 978-9882044678
Publisher: Manhattan
IsArts: No

1.Create a database to store the above data. Store the database file as 3X_YY.accdb .2M

[X is your class and YY is your class number.]

2.Name the table as “textbook”. Define also the key field of the above data.9M

3. The field order should be the same as above shown. 2M

4.Arrange in ascending order of ISBN.2M

5.Create the following 2 queries:

(a)Display all data of Arts textbooks, sort by descending order of publisher.7M

Name the query as “Arts”

(b)Display names and ISBN in which ISBN starts with “978”, sort by ascending order of name.

Name the query as “ISBN”8M

DO NOT TAKE AWAYAND

DO NOT WRITE ANYTHING ON THIS PAPER

S.3 Computer Literacy (2011-2012)

Practical Test (Second Test)

VB Application – Set A [30M]

  1. Download the “setA.exe” at
  2. Define i, ctime, neven, nodd, nzero, sum, cnoAsInteger
  3. When the form loads, the following will happen:

An input box is shown, asking for number of times to play (variable ctime)

Randomize() is added here

Set neven, nodd,nzero & sum to 0

  1. When button1 is clicked, the following will happen:

For I to run from 1 to ctime:

A random integer between 1 and 20 is generated & stored in a variable cno

cno is displayed in the listbox1

cno is added to the variable sum

Depending on the value of cno, give response to the user:

cno = 0increase the value of variable nzero by 1

cno is divisible by 2increase the value of variable neven by 1

not the above 2 casesincrease the value of variable nodd by 1

Display the value of neven in textbox1

Display the value of nodd in textbox2

Display the value of nzero in textbox3

Display the value of sum in textbox4

Depending on the values of nzero, nevennodd, give response to the user in a message box:

(nzero greater than 0) or (neven greater than or equal to nodd)

message:Zero numbers or more (or same) even numbers than odd numbers!

not the above case

message:No zero numbers and more odd numbers than even numbers!

  1. You have to follow the design of the form shown in the program.
  2. Pay attention to the responses, including: changes made at the prompt in msgbox/inputbox, changes made in the listbox.

DO NOT TAKE AWAY AND

DO NOT WRITE ANYTHING ON THIS PAPER