Thursday, September 20, 2012

TOE Chart w/ Psuedocode- Magic 8 Ball

Object
Event
Task
Psuedocode
btnAsk
Left mouse button click

Opens new window, frmAnswer

ON Left Mouse Click
LOAD new window
btnExit
Left mouse button click
Ends the program

ON Left Mouse Click
END

btnClose
Left mouse button click
Closes current window, which should be frmAnswer

ON Left Mouse Click
CLOSE frmAnswer
SHOW frmAsk
txtQuestion
Text input
User types in question they want to be answered


lblAnswer
Form load
Generates random answer and shows it in the label

ON form load
Generate random number between 1-5

IF number is 1
DISPLAY
"DO I LOOK LIKE A MAGIC 8 BALL PROGRAM TO YOU?"

IF number is 2
DISPLAY "Come on, ask a better question."

IF number is 3
DISPLAY "As a wise burger once said, eeyup."

IF number is 4
DISPLAY "What is a question? A rose by any other- wait... Uh... No. No to your question."

IF number is 5
DISPLAY "Why ask such a question? Alas, humanity has truly produced it's most despicable work."

No comments:

Post a Comment