ccc chuen yuen college

Post on 10-May-2022

15 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

1

CCC Chuen Yuen College

Information and Communication Technology

Hong Kong Diploma of Secondary

Education Examination 2012

School-based Assessment

Elective D: Software Development Coursework

English Vocabulary Game

6B (7)

2

Acknowledgement

Eventually, I finished my program. So, I want to thanks the following people.

First, I want to thank my parents since they care me a lot. They always support me while I did

the program. Sometimes, I can’t run the program successfully, I was very sad about it. But, they

will provide me some snake or soup. They let me have enough energy to finish my work.

Secondly, I want to thank my classmates who helped me to solve the program or test my

program. Especially Hon Yu Fung, he helped me to find out why my computer can’t play the

sound track. This problem made me stopped a long while. Also, he suggested some way for me

to approve this report.

Finally, I want to thank my ICT teacher, Mr Hung, who prepares a lot to help us. First, he plans

the schedule for us. Second, he let us to do our coursework in some lesson times. Moreover, he

always reminded us to follow the schedule and ask if we face any problem.

Thanks very much for those people who even helped me!

3

Abstract

Nowadays, English is the most important and common

language of the world. A lot of companies are international,

their mostly works ordin ary use English. Also, ‘The Basic Law of

the Hong Kong Special Administrative Region of the People's

Republic of China’ used the English version shall prevail. Besides,

an example more close to the children is that University’s

teaching language also English! Thus it can be seen that English

is very important!

On the other hand, learning through playing is a good

way for student as they will not easy to feel bored. So, I will

design a game for the children to play and also learn English

vocabulary, it is Word Search! Hope that the user can learn

as much as they can!

In this coursework, I will try my best to finish it. Also, I must make a

good time management, be creative and hard work! Let me tell more

about my works through this coursework! I will tell you what is the user

requirements, the objective of project, system and language. Also, I will

introduce my program for you and bring you to play the game step by

step. Hope that my program being a good program!

4

5

Table of Content

Content Page

Acknowledgement P.2

Abstract P.3

Objective of Project P.5

System and Language P.6 - 7

User Interface Design P.8 - 13

Flowcharts P. 14 - 23

Data Structure and Algorithm Design P. 24 - 30

Files and Variables List P. 31 - 32

Program Listing P. 33 - 47

User Guide P. 48 - 52

User Comment P. 53

Testing and Evaluation P. 54 - 59

Conclusion and Discussion P. 60 - 61

Reference P. 62

6

Objective of Project

The aim of the School-based Assessment is to provide

effective feedback that motivates and improves learning and

broaden the learning opportunities. In this coursework, I should

imagine that I am the IT project manager responsible for a project

that to provide an information system for children to play English

vocabulary games which improve their English vocabulary for an

English language learning centre.

In the project, I have decided to use a game, Word Search, for

the children to learn English vocabulary. User need to find out all

the vocabulary within the words table, the vocabulary can be form

by all directions. User can choose the easy level, middle level or

high level to play. Each level has different required, for example,

more high level, more vocabulary should find. In each round, user

cannot be wrong more than 3 times. If they have wrong more than

3 times, the game will be over.

My program is suitable for primary 1 to 6 student

because each words table include easy vocabulary and also

difficult vocabulary. The user can choose the game level to

suit their study level, I suppose primary 1 to 2 student

choose easy level, so that they can win the game through

find less vocabulary; primary 3 to 4 student choose middle

level; primary 5 to 6 student choose high level.

Whether their English is good or not, they can check

the dictionary while they play the game. So, I can sure that

they can learn so lots if they take the game seriously. Also,

hope that I can learn much through design this program.

7

System and Language

Lowest System Requirements

Computer Frame PII 300 MH above or anther 100% match model

Operating System Windows 98 or above, Linux, Apple etc. support DOS

Hard Disk Driver 2 MB

RAM 128 MB

Space of Storage 5 MB

CPU Pentium 156 Hz

Image Resolution 1024 x 768

Control Mouse, Keyboard

Language:

Using language Pascal

Complier Turbo Pascal v7.0

Displaying language English

Language Type Intended use

Basic Procedural Application, Education

Pascal Procedural Application, Education

Visual Basic Event-driven Application, Education

C Imperative System

C++ Object-oriented Application, System

Java Object-oriented Application

Prolog Declarative Application, Artificial intelligence

8

After I found the different of each programming languages, I have decided

to choose Pascal to design my program. It is because Pascal is easier for me to

handle my program and I had learnt more about Pascal than the other. So, I can

design my program effectively and be more creative.

Quick Pascal:

Microsoft Pascal version 3.2 was released in 1986. The last version of Microsoft Pascal to be

released was version 4.0 in 1988, when Microsoft Pascal was superseded by (the somewhat

short-lived) Microsoft Quick Pascal, a cheaper development tool that Microsoft produced in order to

compete with Borland's Turbo Pascal.

Turbo Pascal:

While all versions of Turbo Pascal could include inline machine code, later versions had the ability to

easily integrate assembly language within Pascal. The user could add watches on variables and

registers in an IDE window.

DEV-Pascal:

Dev-C++ is a free integrated development environment (IDE) distributed under the GNU General

Public License for programming in C and C++. It is bundled with MinGW, a free compiler. The IDE is

written in Delphi.

For my program, I had decided to use Turbo Pascal because it is easy to

debug and I have more experiment for using it to design a program.

9

User Interface Design

Beginning of the program:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Word Search ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Press any key to START the game!

Have FUN!

Designed By Ikumi Chung 5/7/2011 12:34:35

Menu for choose the next step:

Word Search

1: Read the Instruction and Rules | 2: Play Game | 3: Quit the game

Please enter your choice : _

10

After user selects choice 1:

Word Search

1: Read the Instruction and Rules | 2: Play Game | 3: Quit the game Welcome to the game, Word Search!

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

Game Rules:

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

Press any key go back to the menu!

After user selects choice 2:

Word Search

1: Read the Instruction and Rules | 2: Play Game | 3: Quit the game

(A) Theme 1 : Holidays & Festivals

(B) Theme 2 : Food & Drink

(C) Theme 3 : Sports, Interests & Hobbies

(D) Theme 4 : School

Please choose a Theme : _

11

After user selects the theme:

Word Search

1: Read the Instruction and Rules | 2: Play Game | 3: Quit the game

(A) Easy Level (Find out 3 vocabulary)

(B) Middle Level (Find out 6 vocabulary)

(C) High Level (Find out all vocabulary)

Please choose a Level : _

After user selects the level:

Word Search

1: Read the Instruction and Rules | 2: Play Game | 3: Quit the game

A U B O L B D U L Y

V F E O G D R B H A

V B I N Y D A Y I Y

I P E F C H G C K T

C Y C L I N G T I G

C B A A D A X H N Z

H J W J V J S K G N

S I N G F E A X N Z

R C Q L B F X M M C

P Q C S W I M C G G

You have found: 3 Wrong: 0

You may found out all the vocabulary!

You cannot type a wrong answer more than

3 times.

Please Enter Your Answer :

_

12

After user type a correct answer:

Word Search

1: Read the Instruction and Rules | 2: Play Game | 3: Quit the game

A U B O L B D U L Y

V F E O G D R B H A

V B I N Y D A Y I Y

I P E F C H G C K T

C Y C L I N G T I G

C B A A D A X H N Z

H J W J V J S K G N

S I N G F E A X N Z

R C Q L B F X M M C

P Q C S W I M C G G

You have found: 3 Wrong: 0

You may found out all the vocabulary!

You cannot type a wrong answer more than

3 times.

Please Enter Your Answer :

SWIM Wow! Your answer is correct!

Continue!

7 vocabulary(s) left!

After user type a wrong answer:

Word Search

1: Read the Instruction and Rules | 2: Play Game | 3: Quit the game

A U B O L B D U L Y

V F E O G D R B H A

V B I N Y D A Y I Y

I P E F C H G C K T

C Y C L I N G T I G

C B A A D A X H N Z

H J W J V J S K G N

S I N G F E A X N Z

R C Q L B F X M M C

P Q C S W I M C G G

You have found: 3 Wrong: 1

You may found out all the vocabulary!

You cannot type a wrong answer more than

3 times.

Please Enter Your Answer :

AXNZ Sorry! Your answer is wrong!

Please try again!

7 vocabulary(s) left!

13

When user find all answer:

Word Search

1: Read the Instruction and Rules | 2: Play Game | 3: Quit the game

A U B O L B D U L Y

V F E O G D R B H A

V B I N Y D A Y I Y

I P E F C H G C K T

C Y C L I N G T I G

C B A A D A X H N Z

H J W J V J S K G N

S I N G F E A X N Z

R C Q L B F X M M C

P Q C S W I M C G G

You have found: 4 Wrong: 1

You may found out all the vocabulary!

You cannot type a wrong answer more than

3 times.

Conjurations!

You find all the vocabulary!

Hope you learn it all!

Do you want to play again? : _

When user have typed 3 times a wrong answer:

Word Search

1: Read the Instruction and Rules | 2: Play Game | 3: Quit the game

A U B O L B D U L Y

V F E O G D R B H A

V B I N Y D A Y I Y

I P E F C H G C K T

C Y C L I N G T I G

C B A A D A X H N Z

H J W J V J S K G N

S I N G F E A X N Z

R C Q L B F X M M C

P Q C S W I M C G G

You have found: 3 Wrong: 3

You may found out all the vocabulary!

You cannot type a wrong answer more than

3 times.

Oh No! Game is OVER!

You have wrong 3 times!

Do you want to try again? : _

14

If user does not want to try again:

Word Search

1: Read the Instruction and Rules | 2: Play Game | 3: Quit the game

Do you want to quit? (Y/N) : _

If user wants to quit:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Word Search ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Thank You!

BYE! BYE!

15

Flowcharts

Main Program:

Procedure Music:

Procedure DateAndTime:

Start

Play the music

End

Start

Display date & time

End

End

Start

Procedure Begging

Procedure GetName

Procedure Menu

16

17

Procedure Begging:

Procedure GetName:

Start

Start

Display the begging

Procedure Music

Input Key

End

Input Name

End

18

Procedure Instruction:

Procedure AnsOfTheme1 / Procedure AnsOfTheme2 /

Procedure AnsOfTheme3 / Procedure AnsOfTheme4:

Ans = Correct

Wrong Wrong + 1

OK OK + 1

Start

End

Yes No

Start

End

Input Key

Display Instruction

19

Procedure EasyLv:

Wrong > 2 or OK = 3

End

Procedure AnsOfTheme1 ThemeChoice = ‘D’

Procedure AnsOfTheme1

Procedure AnsOfTheme1

Procedure AnsOfTheme1

Yes

Yes

Yes

Yes

No

No

No

Output ‘Enter Ans’

Start

ThemeChoice = ‘A’

Input Ans

ThemeChoice = ‘B’

ThemeChoice = ‘C’

OK = 3 Wrong > 2

Output ‘Conjuration’ Output ‘Try again’

Yes Yes

Yes

No

No

20

Procedure NormalLv:

Wrong > 2 or OK = 6

End

Procedure AnsOfTheme1 ThemeChoice = ‘D’

Procedure AnsOfTheme1

Procedure AnsOfTheme1

Procedure AnsOfTheme1

Yes

Yes

Yes

Yes

No

No

No

Output ‘Enter Ans’

Start

ThemeChoice = ‘A’

Input Ans

ThemeChoice = ‘B’

ThemeChoice = ‘C’

OK = 6 Wrong > 2

Output ‘Conjuration’ Output ‘Try again’

No

No Yes

Yes Yes

21

Procedure HardLv:

Wrong > 2 or OK = 8

End

Procedure AnsOfTheme1 ThemeChoice = ‘D’

Procedure AnsOfTheme1

Procedure AnsOfTheme1

Procedure AnsOfTheme1

Yes

Yes

Yes

Yes

No

No

No

Output ‘Enter Ans’

Start

ThemeChoice = ‘A’

Input Ans

ThemeChoice = ‘B’

ThemeChoice = ‘C’

OK = 8 Wrong > 2

Output ‘Conjuration’ Output ‘Try again’

No

No

Yes

Yes Yes

22

Procedure Game:

Start

Lv = ‘A’

Disply Word Table

Lv = ‘B’

Lv = ‘C’

Procedure EasyLv

Procedure HardLv

Procedure NormalLv

Input Key

End

No

No Yes

Yes

Yes

23

Procedure Level:

Start

Output ‘Choose a Lv’

Input Lv

Lv = ‘A’ or Lv = ‘B’

or Lv = ‘C’

Themechoice = ‘A’

Themechoice = ‘B’

Themechoice = ‘C’

Themechoice = ‘D’

Procedure Game(TXT1)

Procedure Game(TXT2)

Procedure Game(TXT3)

Procedure Game(TXT4)

End

No

No

No

No

Yes

Yes

Yes

Yes

Yes

24

Procedure Theme:

Procedure Ending:

Start

Input Themechoice

Themechoice = ‘A’ or

Themechoice = ‘B’ or

Themechoice = ‘C’ or

Themechoice = ‘D’

End

Start

Display the Ending

Procedure Music

Input Key

End

No

Yes

25

Procedure Menu:

No

End

Start

Input MenuC

MenuC = 1 or

MenuC = 2 or

MenuC = 3

MenuC = 1

MenuC = 2

MenuC = 3

Procedure Theme

Procedure Instruction

Procedure Ending

MenuC = 3 No

No

No

Yes

Yes

Yes

Yes

Yes

26

Data Structure and Algorithm Design

Selection control structure

1. if statement

When we have two or more decision, we can use if-then statement or if-then-else statement.

Example

if (Ans = 'TEMPLE') or (Ans = 'NEWYEAR') or (Ans = 'MOONCAKE') or

(Ans = 'EASTER') or (Ans = 'LANSTER') or (Ans = 'REDPACKET') or

(Ans = 'CHRISTMAS') or (Ans = 'SANTACLAUS')

then begin

OK := OK + 1;

GotoXY(1,23); writeln('You have found: ',OK);

GotoXY(44,13); writeln('Wow! your answer is correct!');

GotoXY(44,14); writeln('Contiune!!!!!!!!!')

end

else begin

Wrong := Wrong + 1;

GotoXY(30,23); writeln('Wrong: ',Wrong);

GotoXY(44,13); writeln('Sorry! Your answer is wrong!');

GotoXY(44,14); writeln('Please try again!');

end;

end;

Syntax of if-then statement

if <Decision>

then <statement>

Syntax of if-then statement

if <Decision>

then <statement 1>

else <statement 2>

27

28

2. case statement

When there are many decisions, we can use case statement. It is easier to handle the decisions

because the syntax can be reduced.

Syntax of case statement

case <decision> of

<case 1> : <statement 1>

<case 2> : <statement 2>

~~~

<case n> : <statement n>

end

Example

case Week of

0: write(' SUNDAY ');

1: write(' MONDAY ');

2: write(' TUESDAY ');

3: write(' WEDMESDAY ');

4: write(' THURSDAY ');

5: write(' FRIDAY ');

6: write(' SATURDAY ');

end;

29

Iteration control structure 1. for-to-do statement

When we know how many times we should repeat the statement, use for-to-do statement can

use less resource.

2. while-do statement

We can do a loop statement when we achieve a target.

Syntax of for-to-do statement

for <count variable> := <initial value> to <final value> do

<loop statement>

Syntax of while-do statement

while <target> do

<loop statement>

Example

for i := 1 to 88 do

read(A,freq[i]);

for i := 1 to 88 do

begin

Sound(freq[i]);

Delay(80);

end;

Example

while not ( Lv in ['A'..'C'] ) do

begin

GotoXY(10,21); writeln('Sorry! Your should only enter A/B/C.');

GotoXY(10,22); write('Please try again : '); readln(Lv);

end;

30

3. repeat-until statement

We can do a loop statement until we achieve a target.

Syntax of repeat-until statement

repeat

<loop statement>

Until <target>

Example

repeat

GotoXY(44,11); writeln(' ');

GotoXY(44,4); writeln('You may found out 3 vocabluaries');

TextColor(YELLOW);

GotoXY(44,10); write('Please Enter Your Answer : ');

GotoXY(44,11); readln(Ans);

until (Wrong > 2) or (OK = 3);

31

32

Other functions 1. Clean all the data on the screen

2. Delay for a setting time

Syntax

Clrscr;

Example

begin { Main program }

Clrscr;

Begging;

GetName;

Menu(MenuChoice);

end.

Syntax

Delay(time);

Example

Delay(80);

33

34

3. Set the date and time

Example

procedure DateAndTime;

var

Year, Month, Day, Week : word;

Hr, Min, Sec, Sec100 : word;

begin

GetDate(Year,Month,Day,Week);

write(Day,'/',Month,'/',Year);

case Week of

0: write(' SUNDAY ');

1: write(' MONDAY ');

2: write(' TUESDAY ');

3: write(' WEDMESDAY ');

4: write(' THURSDAY ');

5: write(' FRIDAY ');

6: write(' SATURDAY ');

end;

GetTime(Hr,Min,Sec,Sec100);

write(hr,':',Min,':',Sec);

end;

35

36

4. Prepare a sound track

Example

procedure Music;{ Make the music }

var

A : TEXT;

i : integer;

freq : array [1..88] of integer;

begin

Assign(A,'abc.txt');

reset(A);

for i := 1 to 88 do

read(A,freq[i]);

for i := 1 to 88 do

begin

Sound(freq[i]);

Delay(80);

end;

Nosound;

Close(A);

end;

37

38

Files and Variables List

File Listing: File Name Function

ICTSBA.EXE Execution file of the program

ICTSBA.PAS Program code

abc.txt The sound track of the program

Theme1.txt The vocabulary table of Holidays & Festivals

Theme2.txt The vocabulary table of Food & Drink

Theme3.txt The vocabulary table of Sports, Interests & Hobbies

Theme4.txt The vocabulary table of School

Libraries used: File Name Function

Crt For running the program in crt mode

Dos For running the program with dos function

Global variables: Variable Name Type Function

Name string Save the name of the user

Ans string Save the answer typed by user

Menuchoice integer Save the user’s choice of the menu

OK integer Record the times of user typed in the correct answer

Wrong integer Record the times of user typed in the wrong answer

Themechoice char Save the user’s choice of the theme

Lv char Save the user’s choice of the level

ThemeC text Identify the theme file

39

Local variables in procedure Music: Variable Name Type Function

A text Identify the sound track file

i integer Counting (no meaning)

freq array[1..88] of string Read the data of sound track file

Local variables in procedure DateAndTime: Variable Name Type Function

Year, Month,

Day, Week

word Save the current day

Hr, Min, Sec,

Sec100

Word Save the current time

Local variables in procedure Game: Variable Name Type Function

TxtName string Get which theme file will be use

ch char Read the data of theme file

x, y, i integer Counting (no meaning)

Local variables in procedure Ending: Variable Name Type Function

Q char ( Have not use in the procedure )

Local variables in procedure Menu: Variable Name Type Function

MenuC integer Use of global variable ‘MenuChoice’

40

41

Program Listing

{ Title : English Vocabulary Game }

{ Name : Chung Yuk Man }

{ Class : 6B }

{ Class No : 7 }

program WordSearch;

uses Crt, Dos;

const

TxT1 = 'Theme1.txt';

TxT2 = 'Theme2.txt';

TxT3 = 'Theme3.txt';

TxT4 = 'Theme4.txt';

var

Name, Ans : string;

Menuchoice, OK, Wrong : integer;

Themechoice, Lv : char;

ThemeC : text;

procedure Music;{ Make the music }

var

A : TEXT;

i : integer;

freq : array [1..88] of integer;

begin

Assign(A,'abc.txt');

reset(A);

for i := 1 to 88 do

read(A,freq[i]);

for i := 1 to 88 do

begin

Sound(freq[i]);

Delay(80);

end;

Nosound;

42

Close(A);

end;

procedure DateAndTime; { Get the current date and time }

var

Year, Month, Day, Week : word;

Hr, Min, Sec, Sec100 : word;

begin

GetDate(Year,Month,Day,Week);

write(Day,'/',Month,'/',Year);

case Week of

0: write(' SUNDAY ');

1: write(' MONDAY ');

2: write(' TUESDAY ');

3: write(' WEDMESDAY ');

4: write(' THURSDAY ');

5: write(' FRIDAY ');

6: write(' SATURDAY ');

end;

GetTime(Hr,Min,Sec,Sec100);

write(hr,':',Min,':',Sec);

end;

procedure Begging; { Display the begging of game }

begin

TextColor(LIGHTGREEN);

GotoXY(5,3);

writeln('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');

GotoXY(9,6); writeln('** ** * *****

* ');

GotoXY(9,7); writeln('** ** * ** *

* ');

GotoXY(9,8); writeln('** ** ** ** * * ** * *** ** ** * * **

**** ');

GotoXY(9,9); writeln(' ** ** ** * * ** * ** * ** * ** * * ** * *

* ');

GotoXY(9,10); writeln(' ** ** ** * ** * ***** **** ** * * ** *

43

* ');

GotoXY(5,13);

writeln('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');

Music;

TextColor(YELLOW);

GotoXY(26,16); writeln('Press any key to START the game!');

GotoXY(36,18); writeln('Have FUN!');

TextColor(LIGHTBLUE);

GotoXY(5,24); writeln('Designed By Ikumi Chung');

GotoXY(52,24); DateAndTime;

Readkey;

Clrscr;

end;

procedure GetName; { Get the user name }

begin

TextColor(YELLOW);

GotoXY(20,10); writeln('Hello! Can you tell me your name first?');

GotoXY(20,15); write('Please enter your name here : ');

readln(Name);

GotoXY(20,20); writeln('Thank you! ',Name);

Clrscr;

end;

procedure Instruction; { Display the rules }

begin

writeln;

TextColor(LIGHTGREEN);

writeln(Name,', welcome to the game, Word Search!');

writeln('Please Read The Game Rules Below!!');

writeln;

TextColor(CYAN);

44

writeln('Objective: Find out the vocabulary within the words table!');

writeln('Tips: The vocabularies can be form by all directions.');

writeln;

TextColor(LIGHTBLUE);

writeln('In the game, you can choose the game level: Easy, Middle or High level!');

writeln('Higher level, more vocabularies should find out.');

writeln;

TextColor(LIGHTRED);

writeln('You cannot be wrong more than 3 times in each round.');

writeln('The game will be over when you make 3 time mistakes!!!');

writeln;

writeln;

TextColor(LIGHTMAGENTA);

writeln('The most suitable player of this program is primary student!');

writeln('Whether your English is good or not, this game also good for you.');

writeln('You would have fun with finding the words cause it is exciting!');

writeln('If you find difficulties, you can check the dictionary while you are playing!');

writeln;

TextColor(YELLOW);

writeln('So, lets play the game and have fun! Good lucky!');

writeln;

TextColor(YELLOW+BLINK);

writeln('( Press any key back to the menu! )');

Readkey;

TextColor(LIGHTGRAY);

Clrscr;

end;

procedure AnsOfTheme1; { Check if the answer is correct of theme1 }

begin

if (Ans = 'TEMPLE') or (Ans = 'NEWYEAR') or (Ans = 'MOONCAKE') or

(Ans = 'EASTER') or (Ans = 'LANSTER') or (Ans = 'REDPACKET') or

(Ans = 'CHRISTMAS') or (Ans = 'SANTACLAUS')

then begin

OK := OK + 1;

GotoXY(1,23); writeln('You have found: ',OK);

GotoXY(44,13); writeln('Wow! your answer is correct!');

GotoXY(44,14); writeln('Contiune!!!!!!!!!')

45

end

else begin

Wrong := Wrong + 1;

GotoXY(30,23); writeln('Wrong: ',Wrong);

GotoXY(44,13); writeln('Sorry! Your answer is wrong!');

GotoXY(44,14); writeln('Please try again!');

end;

end;

procedure AnsOfTheme2; { Check if the answer is correct of theme2 }

begin

if (Ans = 'SANDWICH') or (Ans = 'HAMBURGER') or (Ans = 'TEA') or

(Ans = 'DIMSUM') or (Ans = 'COKE') or (Ans = 'COFFEE') or

(Ans = 'MILK') or (Ans = 'SUSHI')

then begin

OK := OK + 1;

GotoXY(1,23); writeln('You have found: ',OK);

GotoXY(44,13); writeln('Wow! your answer is correct!');

GotoXY(44,14); writeln('Contiune!!!!!!!!!')

end

else begin

Wrong := Wrong + 1;

GotoXY(30,23); writeln('Wrong: ',Wrong);

GotoXY(44,13); writeln('Sorry! Your answer is wrong!');

GotoXY(44,14); writeln('Please try again!');

end

end;

procedure AnsOfTheme3; { Check if the answer is correct of theme3 }

begin

if (Ans = 'BASKETBALL') or (Ans = 'SINGING') or (Ans = 'SWIM') or

(Ans = 'HIKING') or (Ans = 'BADMINTON') or (Ans = 'CYCLING') or

(Ans = 'TENNIS') or (Ans = 'READING')

then begin

OK := OK + 1;

GotoXY(1,23); writeln('You have found: ',OK);

GotoXY(44,13); writeln('Wow! your answer is correct!');

GotoXY(44,14); writeln('Contiune!!!!!!!!!')

46

end

else begin

Wrong := Wrong + 1;

GotoXY(30,23); writeln('Wrong: ',Wrong);

GotoXY(44,13); writeln('Sorry! Your answer is wrong!');

GotoXY(44,14); writeln('Please try again!');

end

end;

procedure AnsOfTheme4; { Check if the answer is correct of theme4 }

begin

if (Ans = 'PLAYGROUND') or (Ans = 'CLASSROOM') or (Ans = 'JANITOR') or

(Ans = 'PRINCIPAL') or (Ans = 'TEACHER') or (Ans = 'CLASSMATE') or

(Ans = 'PE') or (Ans = 'HALL')

then begin

OK := OK + 1;

GotoXY(1,23); writeln('You have found: ',OK);

GotoXY(44,13); writeln('Wow! your answer is correct!');

GotoXY(44,14); writeln('Contiune!!!!!!!!!')

end

else begin

Wrong := Wrong + 1;

GotoXY(30,23); writeln('Wrong: ',Wrong);

GotoXY(44,13); writeln('Sorry! Your answer is wrong!');

GotoXY(44,14); writeln('Please try again!');

end

end;

procedure EasyLv; { Play the game with easy level }

begin

repeat

GotoXY(44,11); writeln(' ');

GotoXY(44,4); writeln('You may found out 3 vocabluaries');

TextColor(YELLOW);

GotoXY(44,10); write('Please Enter Your Answer : ');

GotoXY(44,11); readln(Ans);

47

Textcolor(LIGHTGREEN);

case ThemeChoice of

'A' : AnsOfTheme1;

'B' : AnsOfTheme2;

'C' : AnsOfTheme3;

'D' : AnsOfTheme4;

end;

if OK = 3

then begin

TextColor(LIGHTBLUE);

GotoXY(44,18); writeln('Conjurations!');

GotoXY(44,19); writeln('You found out 3 vacabularies!');

GotoXY(44,20); writeln('Hope you learn it all!');

Music;

TextColor(YELLOW+BLINK);

GotoXY(44,22); writeln('( Press any key back to the menu! )');

TextColor(LIGHTGRAY);

end;

if Wrong > 2

then begin

TextColor(LIGHTBLUE);

GotoXY(44,18); writeln('Oh No! Game is OVER!');

GotoXY(44,19); writeln('You have wrong 3 times!');

Music;

TextColor(YELLOW+BLINK);

GotoXY(44,22); writeln('( Press any key back to the menu! )');

TextColor(LIGHTGRAY);

end;

until (Wrong > 2) or (OK = 3);

end;

procedure NormalLv; { Play the game with normal level }

begin

repeat

GotoXY(44,11); writeln(' ');

48

GotoXY(44,4); writeln('You may found out 6 vocabluaries');

TextColor(YELLOW);

GotoXY(44,10); write('Please Enter Your Answer : ');

GotoXY(44,11); readln(Ans);

Textcolor(LIGHTGREEN);

case ThemeChoice of

'A' : AnsOfTheme1;

'B' : AnsOfTheme2;

'C' : AnsOfTheme3;

'D' : AnsOfTheme4;

end;

if OK = 6

then begin

TextColor(LIGHTBLUE);

GotoXY(44,18); writeln('Conjurations!');

GotoXY(44,19); writeln('You found out 6 vacabularies!');

GotoXY(44,20); writeln('Hope you learn it all!');

Music;

TextColor(YELLOW+BLINK);

GotoXY(44,22); writeln('( Press any key back to the menu! )');

TextColor(LIGHTGRAY);

end;

if Wrong > 2

then begin

TextColor(LIGHTBLUE);

GotoXY(44,18); writeln('Oh No! Game is OVER!');

GotoXY(44,19); writeln('You have wrong 3 times!');

Music;

TextColor(YELLOW+BLINK);

GotoXY(44,22); writeln('( Press any key back to the menu! )');

TextColor(LIGHTGRAY);

end;

49

until (Wrong > 2) or (OK = 6);

end;

procedure HardLv; { Play the game with hard level }

begin

repeat

GotoXY(44,11); writeln(' ');

GotoXY(44,4); writeln('You may find out 8 vocabluaries');

TextColor(YELLOW);

GotoXY(44,10); write('Please Enter Your Answer : ');

GotoXY(44,11); readln(Ans);

Textcolor(LIGHTGREEN);

case ThemeChoice of

'A' : AnsOfTheme1;

'B' : AnsOfTheme2;

'C' : AnsOfTheme3;

'D' : AnsOfTheme4;

end;

if OK = 8

then begin

TextColor(LIGHTBLUE);

GotoXY(44,18); writeln('Conjurations!');

GotoXY(44,19); writeln('You found all the vacabularies!');

GotoXY(44,20); writeln('Hope you learn it all!');

Music;

TextColor(YELLOW+BLINK);

GotoXY(44,22); writeln('( Press any key back to the menu! )');

TextColor(LIGHTGRAY);

end;

if Wrong > 2

then begin

TextColor(LIGHTBLUE);

GotoXY(44,18); writeln('Oh No! Game is OVER!');

50

GotoXY(44,19); writeln('You have wrong 3 times!');

Music;

TextColor(YELLOW+BLINK);

GotoXY(44,22); writeln('( Press any key back to the menu! )');

TextColor(LIGHTGRAY);

end;

until (Wrong > 2) or (OK = 8);

end;

{ Display the word table and ask user to enter the answer }

procedure Game(TxtName : string);

var

ch : char;

x, y, i : integer;

begin

assign(ThemeC,TxtName);

reset(ThemeC);

x := 10;

y := 3;

while not eof (ThemeC) do

begin

while not eoln (ThemeC) do

begin

read(ThemeC, ch);

GotoXY(x,y);

write(ch);

x := x + 2;

end;

y := y + 2;

x := 10;

readln(ThemeC);

end;

close(ThemeC);

for i := 1 to 25 do

begin

GotoXY(40,i);

51

write(#222);

end;

GotoXY(44,3); writeln(Name,',');

GotoXY(44,5); writeln('Cannot wrong more than 3 times.');

OK := 0;

Wrong := 0;

case Lv of

'A' : EasyLv;

'B' : NormalLv;

'C' : HardLv;

end;

readkey;

end;

procedure Level; { Ask user to choose a level }

begin

GotoXY(1,10); writeln('(A) Easy Level (Find out 3 vocabulary)');

GotoXY(1,11); writeln('(B) Normal Level (Find out 6 vocabulary)');

GotoXY(1,12); writeln('(C) Hard Level (Find out all vocabulary)');

TextColor(YELLOW);

GotoXY(10,20); write(Name,', please choose a Level (A/B/C) : ');

readln(Lv);

while not ( Lv in ['A'..'C'] ) do

begin

GotoXY(10,21); writeln('Sorry! Your should only enter A/B/C.');

GotoXY(10,22); write('Please try again : '); readln(Lv);

end;

Clrscr;

TextColor(LIGHTGREEN);

52

case Themechoice of

'A' : Game(TXT1);

'B' : Game(TXT2);

'C' : Game(TXT3);

'D' : Game(TXT4);

end;

Clrscr;

end;

procedure Theme; { Ask user to choose a theme }

begin

GotoXY(1,10); writeln('(A) Theme 1 : Holidays & Fedtivals');

GotoXY(1,11); writeln('(B) Theme 2 : Food & Drink');

GotoXY(1,12); writeln('(C) Theme 3 : Sports, Interests & Hobbies');

GotoXY(1,13); writeln('(D) Theme 4 : School');

TextColor(YELLOW);

GotoXY(10,20); write(Name,', please choose a theme (A/B/C/D) : ');

readln(Themechoice);

while not ( Themechoice in ['A'..'D'] ) do

begin

GotoXY(10,21); writeln('Sorry! Your should only enter A/B/C/D.');

GotoXY(10,22); write('Please try again : '); readln(Themechoice);

end;

Clrscr;

TextColor(LIGHTGREEN);

Level;

Clrscr;

end;

procedure Ending; { Display the ending of the game }

var

Q : char;

53

begin

Clrscr;

GotoXY(5,3);

writeln('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');

GotoXY(9,6); writeln('** ** * *****

* ');

GotoXY(9,7); writeln('** ** * ** *

* ');

GotoXY(9,8); writeln('** ** ** ** * * ** * *** ** ** * * **

**** ');

GotoXY(9,9); writeln(' ** ** ** * * ** * ** * ** * ** * * ** * *

* ');

GotoXY(9,10); writeln(' ** ** ** * ** * ***** **** ** * * ** *

* ');

GotoXY(5,13);

writeln('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');

TextColor(LIGHTRED);

GotoXY(10,15); writeln('***** ** ** ******* ***** ** ** *******

***');

GotoXY(10,16); writeln('** * ** ** ******* ** * ** ** *******

***');

GotoXY(10,17); writeln('** * ** ** ** ** * ** ** **

***');

GotoXY(10,18); writeln('***** **** ***** ***** **** *****

***');

GotoXY(10,19); writeln('** *** ** ** ** *** ** **

');

GotoXY(10,20); writeln('** * ** ******* ** * ** *******

***');

GotoXY(10,21); writeln('******** ** ******* ******** ** *******

***');

Music;

TextColor(LIGHTGREEN);

GotoXY(15,23); writeln('Thanks for playing! Hope you like it and play again!');

TextColor(YELLOW+BLINK);

GotoXY(27,24); writeln('( Press any key to leave! )');

54

Readkey;

end;

procedure Menu(var MenuC : integer); { Ask user to continue the game }

begin

repeat

TextColor(LIGHTGREEN);

GotoXY(35,2); writeln('Word Search');

TextColor(LIGHTGRAY);

GotoXY(1,3); writeln('-------------------------------------------------------------------------------');

TextColor(LIGHTRED);

GotoXY(5,4); writeln('1: Read the Instruction and Rules |');

TextColor(YELLOW);

GotoXY(43,4); writeln('2: Play game |');

TextColor(LIGHTBLUE);

GotoXY(60,4); writeln('3: Quit the game');

TextColor(LIGHTGRAY);

GotoXY(1,5); writeln('-------------------------------------------------------------------------------');

TextColor(LIGHTGREEN);

GotoXY(20,13); write(Name,', please enter your choice : '); readln(MenuC);

while not ( MenuC in [1..3] ) do

begin

GotoXY(12,20); writeln('Sorry! Your should only enter 1/2/3.');

GotoXY(13,20); write('Please try again : '); readln(MenuC);

end;

Clrscr;

case MenuC of

1 : Instruction;

2 : Theme;

3 : Ending;

end;

until menuC = 3;

Clrscr;

end;

55

begin { Main program }

Clrscr;

Begging;

GetName;

Menu(MenuChoice);

end.

~ This is the end of the program listing ~

56

User Guide

Computer Frame: PII 300 MH or above

Operating System: Windows 98 or above

RAM: 128 MB or above

Operating equipments: Mouse, Keyboard

Program installation 1. Insert the CD. The CD / DVD drive will open automatically.

If not, follow part a and b bellow:

a. Open My Computer

b. Open CD / DVD drive

2. Create a folder in the desktop

3. Copy all the files in the CD into the folder

4. Finish installation

57

Start the program

1. Click ‘ICTSBA.exe’ to start the program

2. Wait for the music play

3. Press any key to start the game

58

4. Enter your name

5. Enter ‘1’ to read the instruction and rules; ‘2’ to play game; ‘3’ to quit the game

6. Enter A/B/C/D to choose a theme

59

7. Enter A/B/C to chose a level

8. Find the vocabularies through the word table and type in the answer

60

9. When you quit the game, press any key to leave when the music end

Delete the program

1. Right click the folder ‘VocabGame’

2. Press Yes to delete the program

3. Finish uninstallation

61

~ This is the end of the user guide ~

62

User Comment

Me

Funny

User Friendly

Good for learning

User 1

Funny

User Friendly

Good for learning

User 2

Funny

User Friendly

Good for learning

User 3

Funny

User Friendly

Good for learning

In my point of view, I think this game is not fun enough because it does not have many changes.

Also, since there are no explanation and tips for the user, it is not good for learning. However, I think

my design is user friendly because the program has clear pointing and the user interface is neat.

After seeing the comment of users, I know that the game is not funny enough. Just like my

feeling, beside user1 give me 4 points, other think it is not good for learning. Also, they think my

program is user friendly. All in all, my program is not very well, I should improve more.

63

64

Testing and Evaluation

Test for getting user’s name:

Input Data Response Result

Peter Move to the menu Success

123 Move to the menu Fail

+-*/ Move to the menu Fail

abcdefghijklmn Move to the menu Fail

Enter Key Move to the menu Fail

All the entry is success, but entry besides English Character should prevent.

Also, empty and long string should prevent.

Test for the menu:

Input Data Response Result

4 Ask user to enter again Success

F Program automatically close Fail(should be ask to enter again)

Enter Key Move to the next line Fail(should be ask to enter again)

65

Test for the menu: Input ‘1’, then display the rules and introductions, result : success.

Input ‘2’, then move to the theme choice page, result : success.

Input ‘3’, then show the ending and quit the game, result : success.

66

Test for the theme choice:

Input Data Response Result

A Move to the level choice page Success

E Ask user to enter again Success

a Ask user to enter again Success

1 Ask user to enter again Success

Test for the level choice:

Input Data Response Result

A Move to the game(easy level) Success

B Move to the game(normal level) Success

C Move to the game(hard level) Success

E Ask user to enter again Success

a Ask user to enter again Success

1 Ask user to enter again Success

67

68

Test for the game: Input the wrong answer, then display times of wrong, ask user to enter again, result : success.

Input the correct answer, then display the times of found,

ask user to enter the next answer, result : success.

69

Wrong for the most times of level chosen, then over the game, result : success.

( For the following picture, 3 times is the most changes of easy level )

Correct for the times required, then over the game, result : success.

Input the answer that had entered, then correct times + 1, result : fail.

( I should prevent user to enter twice or more times by the same answer. )

70

71

Evaluation:

The program has achieved the requirements set in the proposal. But, the

display of the vocabulary table in the game is very simple. I didn’t insert the

table line and let user know which vocabulary they have found. It affects the

user friendly of the program very much.

The game included four themes to choose. It means the user can learn the

English vocabulary from four types. However, I didn’t add some tips and show

the explanation of the vocabulary. It decreases the learning value of the game.

Besides, I found that I have not done enough for the variable checking. If I

had checked the program carefully, I would have a better program. So, I hope

that the users can forgive me while they meet the errors.

72

73

Conclusion and Discussion

After more than half year’s work, my program and report finally finished. All

in all, I’ve learn so much form it. Start from thinking for design what game for

the children to play, end of testing and evaluation the program.

In the begging, I went to library and search from the website for finding

some English vocabulary. After thinking the ability of my mine, I’ve choose work

search for doing my program. I think the proposal is suit my ability, so I must do

it well by using more time.

After submitting the project proposal, I start to code the program. I think

develop this game is not very hard, also not very easy. Since I’ve done my

program using many time, I think I should ask more why I face the problem that

I don’t know how to solve.

74

75

After program coding, I need to finish the whole project report. In this part,

I think I’ve done not very well since I have not spent enough time in this. I did

my program so slow. I need to learn how to control the time. Moreover, I need

to debug more and more, so that my program and project report can be better.

Also, I found that make a good game is not a easy job, it must be creative and

user friendly.

However, I’ve success to run my program and finished the project report. It

made me very happy and relaxes, although there are a lot of classless mistakes

and the study tips are not enough. Nevertheless, I’ve learned a lot of Pascal

program’s skills.

The most things I need to improve is the time management. I think I will do

better than now if I use more time. I will remember this experience and learn to

make a good time management. Also, I need to be braver to ask others. Hope

that my program can provide a convenient interface and make use for the

children.

76

Reference

Books:

Turbo Pascal 入門與應用徹底剖析

Writer: 洪錦魁

Publisher: 文魁資訊

New Senior Secondary Information and Communication Technology

Elective D1: Software Development

Writer: Henry C H Ha

Publisher: Longman Hong Kong Education

玩出英語力 : 和美國中小學生一起玩出「英語力」

Writer: Organis Rivers, 呂珮榮

Publisher: 我識出版社有限公司

( For finding the game and vocabulary )

Upper Form’s Projects: Chan Chiu Yau

Cheng Pui Shan

Cheung Kin Wai

Website: Wikipedia

http://en.wikipedia.org/wiki/Main_Page

~ THE END ~

~ Thank you for reading this report ~

top related