exam for programmers
TRANSCRIPT
Create a folder on the Desktop named “Your Name”. Save ALL your files source code .mdb .txt .etc there.
CHOOSE ONE:
1. HANGMAN
Randomly retrieve a word from a dictionary. Your dictionary may be implemented in any way you want (e.g in memory, File-based, Access database, SQL Server etc.)
The player will be given 7 chances to guess if a letter is in the word. The player may guess the word anytime. Upon guessing a word correctly, increase the player’s score and start a new game. If the player failed to guess the word in 7 chances, ask if he wants to start a new game.
You may implement your own scoring scheme.
2. SCRABBLE
Your friend is playing scrabble. He asked for your help. Your task as a Vinta Systems programmer will be to create a program to aid him.
First you need a list of seven letters (valid scrabble letters – see below). This may be randomly generated from a pool of scrabble letters or it may be user-specified. The letter would be more useful to your friend but the former would display your programming skill.
Second, you need to create all the possible letter combinations (i.e 2-letter. 3-letter)
Third, you need to search all the letter combinations from a dictionary to determine if it is a valid word. Your dictionary may be implemented in any way that you want (e.g memory, file-based. Access database, SQL server etc)
Lastly, present all the valid words to the user.
BONUS
Add, edit, delete words from the dictionary
Extend dictionary – Tagalog words
Scoring – find valid words with score > some value
Valid Scrabble Letters
A - 9 B – 2 C - 2 D – 4 E - 12 F – 2
G - 3 H -2 I - 9 J – 1 K - 1 L - 4
M - 2 N - 6 O - 8 P – 2 Q - 1 R - 6
S - 4 T - 6 U - 4 V – 2 W - 2 X - 1
Y - 2 Z - 1