Đề thi thực hành PCS i10 Aptech [ NEW 2012 ]
Đây là đề thi của một bạn sinh viên thi lại 6 lần mới có được, gửi các bạn tham khảo.
Chúc các bạn thi tốt!
In this Exam,you'll have to creat a Dictionary application.This application allows you add new words,modify a word's meaning,
delete a word and search a word.
1.interface named IWord: (1 pt)
Word-string,red/write
Meaning-string,read/write
void Display()
2.interface named IDictionary: (1 pt)
Methods
i.bool AddWord(string word,IWord objWord)
ii.bool EditWord(string word,string meaning)
iii.bool Remove(string word)
iv.void Search(string word)
3.Tao 1 class co ten Word cai dat giao dien IWord: (2 pt)
This Display method will display the word along with its meaning to the Console.
4.Create a Class named Dictionary: (16 pt)
a.Implements the IDictionary
b.Create a generic dictionary object to store all the words.
c.AddWord method has to check the word before add.
if the word was not already exists in the dictionary,add the objWord to the dictionary with key=
the word.
If the word already exists you must append new meaning to old meaning(Word's meaning=Old Meaning + New Meaning)
of the matched word object.
d.EditWord method allows you change the meaning of a word by:
Search from the dictionary for the word entered,if found then change to the new meaning.
e.Remove method allows you remove a word from the dictionary.
f.Search method allows you to search meaning by given word
5.Crate a MyDictionary class: (4 pt)
a.Display a task menu to choose
Creat an instance of Dictionary.
Menu:
1.Add a Word
2.Edit a word
3.Remove a word
4.Sort
5.Search
6.Clear Screen
7.Exit
Press key...
b.If user type 1 from keyboard:
Ask user to enter a new word with meaning.
Add a new word to the dictionary(5.a)
c.If user type 2 from keyboard:
Ask user to enter a word edit.
Ask user to enter meaning of the word.
Execute Edit method from the Dictionary instance(5.a)
d.If user type 3 from keyboard:
Remove a word from the Dictionary instance(5.a)
e.If user type 4 from keyboard:
Ask whether user want to sort the dictionary by word ascending or descending
According to user response,display all word along with meaning by word ascending/descending.
f.If user type 5 from keyboard:
Search the meaning of a word.If the word not existed in the dictionary,you should display"The word is not found"in the console.
g.If user type 6 from keyboard:
Clear the console screen.
h.While user not chooses Exit(type 7 from keyboard) then go back to the menu step 3.a to ask user chooses on option.
6.Handle and display meaningful error description throughout the application: (1 pt)
delete a word and search a word.
1.interface named IWord: (1 pt)
Word-string,red/write
Meaning-string,read/write
void Display()
2.interface named IDictionary: (1 pt)
Methods
i.bool AddWord(string word,IWord objWord)
ii.bool EditWord(string word,string meaning)
iii.bool Remove(string word)
iv.void Search(string word)
3.Tao 1 class co ten Word cai dat giao dien IWord: (2 pt)
This Display method will display the word along with its meaning to the Console.
4.Create a Class named Dictionary: (16 pt)
a.Implements the IDictionary
b.Create a generic dictionary object to store all the words.
c.AddWord method has to check the word before add.
if the word was not already exists in the dictionary,add the objWord to the dictionary with key=
the word.
If the word already exists you must append new meaning to old meaning(Word's meaning=Old Meaning + New Meaning)
of the matched word object.
d.EditWord method allows you change the meaning of a word by:
Search from the dictionary for the word entered,if found then change to the new meaning.
e.Remove method allows you remove a word from the dictionary.
f.Search method allows you to search meaning by given word
5.Crate a MyDictionary class: (4 pt)
a.Display a task menu to choose
Creat an instance of Dictionary.
Menu:
1.Add a Word
2.Edit a word
3.Remove a word
4.Sort
5.Search
6.Clear Screen
7.Exit
Press key...
b.If user type 1 from keyboard:
Ask user to enter a new word with meaning.
Add a new word to the dictionary(5.a)
c.If user type 2 from keyboard:
Ask user to enter a word edit.
Ask user to enter meaning of the word.
Execute Edit method from the Dictionary instance(5.a)
d.If user type 3 from keyboard:
Remove a word from the Dictionary instance(5.a)
e.If user type 4 from keyboard:
Ask whether user want to sort the dictionary by word ascending or descending
According to user response,display all word along with meaning by word ascending/descending.
f.If user type 5 from keyboard:
Search the meaning of a word.If the word not existed in the dictionary,you should display"The word is not found"in the console.
g.If user type 6 from keyboard:
Clear the console screen.
h.While user not chooses Exit(type 7 from keyboard) then go back to the menu step 3.a to ask user chooses on option.
6.Handle and display meaningful error description throughout the application: (1 pt)
Nguồn : Internet
0 nhận xét:
Post a Comment