Codingassignmenthelper | Home Codingassignmenthelper | Samples

Array Exercise 1 - Fortune Predictor

Array Exercise 1

Array Exercise 1 - Fortune Predictor

		Array Exercise 1 - Fortune Predictor
Let’s look at some examples of using arrays.
First make a new project called Predictor, then……
Create an array of strings called timeArray with the following data:










thirty minutes
an hour
eight hours
twelve hours
a day
a week
a month
a year
a decade

Create an array of strings called aspectArray with the following data:






finances
love life
career prospects
travel plans
relationships

Create an array of strings called effectArray with the following data:







fall apart
exceed your expectation
become awkward in an unexpected way
become manageable
become spectacular
come to a positive outcome

Create an array of strings called personaArray with the following data:










man
boy
woman
girl
dog
bird
hedgehog
singer
relative

Create an array of strings called featureArray with the following data:







pink hair
a broken goldenchain
scary eyes
long blond nose hair
very red lips
silver feet

Create an array of strings called consequenceArray with the following data:







avoid looking at directly
sing a sad song with
stop and talk to
dance with
tell a secret
buy a coffee

Create a Button click event and a TextBlock for output.

In the click event use a random number to select an element randomly from each of the strings, as the
following example illustrates timeArray[number.Next(0, timeArray.Length)].

In the click event, add the arrays to the following string to build a basic fortune predictor (use
theTextBlock to output the string):
Over a period of timeArray your aspectArray will effectArray.
This will come to pass after you meet a personaArray with featureArray who for some reason you find
yourself obliged to consequenceArray.

Use the TextBlock string to also output the prediction as a text-to-talk message.

Now add an image to your application.

Finally… change the message and the content of the arrays to develop your own version of the
application…


		
To Download Click Here > 002 Array Exercise 1.pdf
Codingassignmenthelper | Home Codingassignmenthelper | Home