Sunday, March 15, 2009

Last's Weeks Programming class



Last Weeks one lesson was a jam packed week filled with mysterious objects called:-
"If" statements,
Logical operators e.g "And","Or",& "not"
and Message Box's ...
Last week We Created and If & Not statement program That included an option to choose cat or a dog.
I also added an option to choose "I don't like pets"
On the other side we Put "music prefrences"
I put the prefs "Hard Rock" & "Country" & "I don't like music" ...
E.G
So when the user clicks the Cat or Dog option it would come up with a message box stating their preferences E.G
Cats:-

Dogs:-

and Because I was bored and wanted to test what I learned I added in the option for no music:-

No Pets:-

On The other side of the form you also have the Music Preferences of Hard Rock, Country, and no Music .... Although I shoulda changed these to music I loved, I was happy to just fiddle with the code and add in the extra preferences that I did do .... But again it came up with the following once you selected one ....

E.G

Hard Rock:-

Country:-

And again I fiddled with the code to add in the third option and it displays

No Music:-

Though I am curious to if you can control the layout of these messages boxes to create I nice smooth visual scenario .... but I gather this will come into the time that follows

1 comment:

  1. Hey Azza.

    Wouldn't it be fair to assume that, having picked option B for music, it would automatically assume option C as well?

    Just curious.

    Timbo.

    ReplyDelete