Lot To Generator

You might also like

Download as rtf, pdf, or txt
Download as rtf, pdf, or txt
You are on page 1of 2

generate a username (using only uppercaseletters) and generate a random number to help

select lottery numbers. The system will initially allow the user to enter their forename and
surname. Once entered a menu of options will be presented to the user with three choices:

Option 1

will generate a username in the format of first initial of forename and your surname combined.
The username must be displayed in uppercase

.Option 2

will generate the lottery 6 random numbers.

Option 3

Quit/Exit the application The input menu is required to run (loop) until the user enters the quit
option

----

Forename - Opt1(); - Store Forname in alert box

Surname - Opt1(); - Store Surname in alert box

myChoice - MenuPicker(); - Prompt that holds value of input box from user, will be in the form of
an Interger

string1 - Opt1(); - Variable for First character of forename

username - Opt1(); - store variable made from Forename + Surname

i - Opt2(); Part of the loop that runs 6 times

lottery - Opt2(); used to produce the lottery random number. Maths.floor to round
Maths.random to generate random number

----

Functions:

menuOptions() - Displays menu for option 1,2 and 3. Button to launch menuPicker()
menuPicker() - Repeats indefinetley until the user selects quit option 3. Method call dependant
on user.

Opt1() - Displays users username in the format forename, surname - FSURNAME

Opt2() - Generates and displays the lottery 6 random numbers

Opt3() - Clears the screen and displays 'Program Ended' Message

You might also like