Design, code, test and evaluate a system to accept and test a password for certain characteristics.
It should be at least 6, and no more than 12 characters long
The system must indicate that the password has failed and why, asking the user to re enter their choice until a successful password is entered.
A message to indicate that the password is acceptable must be displayed.
Password strength can be assessed against simple criteria to assess its suitability; for example a password system using only upper and lower case alphabetical characters and numeric characters could assess the password strength as:
WEAK if only one type used, eg all lower case or all numeric
MEDIUM if two types are used
STRONG if all three types are used.
For example hilltop, 123471324, HAHGFD are all WEAK, catman3 and 123456t are MEDIUM and RTH34gd is STRONG
A message to indicate the password strength should be displayed after an acceptable password is chosen.
Design, code and test a system to store and manage user names and their highest score.
The system must be able to :
create a file
add data to a file
locate data in the file by name and their highest score
delete an item and its associated data from the file
locate and update a high score for a user
The system need only cater for 10 items
Design, code, test and evaluate a program (or programs) that will convert between binary and decimal.
Decimal to Binary: converter the program should accept a positive value and output the binary equivalent. The system need only be tested for values up to 255.
To convert the decimal value 43 to binary:
43 ÷ 2 = 21 Remainder 1
21 ÷ 2 = 10 Remainder 1
10 ÷ 2 = 5 Remainder 0
5 ÷ 2 = 2 Remainder 1
2 ÷ 2 = 1 Remainder 0
1 ÷ 2 = 0 Remainder 1
Once the result is 0 the remainder values form the binary equivalent of our decimal number
43 decimal = 101011 binary
Binary to Decimal: For the binary to decimal converter the program should only accept valid inputs (a series of 0s and 1s) and output the decimal equivalent. The program need only be tested for inputs of up to 8 binary digits.
To convert the binary value 1101 to decimal:
Take each value in the binary string starting at the right-hand end, the least significant bit, and multiply by 1 then 1×2, then 1×2×2, then 1×2×2×2 etc.
1 × 1 = 1
0 × 1× 2 =0
1 × 1 × 2 × 2 = 4
1 × 1 × 2 × 2 × 2 = 8
Add the decimal values to get the decimal equivalent of 1101, which is 13.
Design, code, test and evaluate a program that will accept two binary values (up to 8 binary digits) and output their total in binary.
Design, code, test and evaluate a program for this simulation.
a food vending machine accepts 10p, 20p, 50p and £1 coins.
one or more coins are inserted and the current credit is calculated and displayed.
a product is selected from those available.
the system checks to see if there is enough credit to purchase the product chosen.
if there is not enough credit the system displays an error message.
if there is enough credit it dispenses the product, updatesthe credit available and displays the remaining credit.
further selections can be made if there is enough credit.
the vending machine simulation should have five products and prices.
Create a simple calculator interface with the digits 0–9, a plus sign, a minus sign, a clear button, an equals sign and a display. The calculator should be able to perform addition and subtraction of integer values. These integer values should be input by pressing the keys on your calculator interface. The system need only work with values up to 999.
Create a program that will store the ingredients for a recipe.
The program should ask the user to input:
the number of people the recipe will serve
a list of ingredients: item, quantity and units for example flour, 150, grams
the program should store the recipe name, number of people and the list of ingredients with their quantities and units.
The user should be able to retrieve the recipe and have the ingredients recalculated for a different number of people.
The program should ask the user to input the number of people.
The program should output:
the recipe name
the new number of people
the revised quantities with units for this number of people.
Create a simple hang man game with a set of related words in an array. These words should be selected randomly from the array and the correct number of characters in the selected word should be indicated on the screen. The player guesses letters from the word and, if these are in the word they are placed in the correct position, otherwise one life is lost. The player has six lives.
The system should:
record the letters that have been used by the player and not accept these again during the play
record the number of lives left after the word has been guessed and use these as a score
allow an end user to enter new sets of words.
Create a simple currency exchange calculator to convert between four major currencies, Pound sterling, Euro, US Dollar and Japanese Yen.
The system should be able to have exchange rates changed regularly by the user.
The user should be able to enter an amount, select the chosen currency for this and the currency into which this should be converted.
The figure shown should be displayed to two decimal places, for example to the nearest cent in US Dollars.
A data file will be supplied for this task.
A simple address book system holds names, addresses and telephone numbers for friends and family and business contacts.
The system stores:
a surname and first name
two lines of the address and a post code
a telephone number
date of birth
email address.
Create a program to search this data file:
by surname to retrieve and display the details for a contact
by date of birth to retrieve and display all contacts with a birthday in a particular month.