Would you like to make this site your homepage? It's fast and easy...
Yes, Please make this my home page!
SE
450 Homework Assignment #2: Blinking Text Applet
The
Programmer's Poem -- Author Unknown
<
> ! * ' ' #
^ @ ` $ $ -
* ! ' $ _
% * < > #4
& ) . . /
{ ~ | * * SYSTEM HALTED
waka
waka bang splat tick tick hash
carat at back-tick dollar dollar dash
splat bang tick dollar underscore
percent splat waka waka number four
amperstand right-paren dot dot slash
curly bracket tilde pipe splat splat crash
To
implement one of my favorite pieces of computer poetry, I modified the java
applet Blink.java to do several things differently from the original code.
Blink1.java uses the characters from the left side of the poem. The sans
serif font now has a bold face attribute and the range of colors is limited
to the blue and green spectrum. The red setting is set to 0 and the green is
set to 100. The initial value for blue is determined randomly and as the symbols
are iterated through, the amount of blue increases in the color mix until it
rolls over. Blink2.java uses the words from the right side of the poem.
The sans serif font now has an italic attribute. The color has the green and
blue components set (each is set to 100) while the red component is determined
randomly. As the tokens are iterated through, the value of the red is increased
until it rolls over. In both applets, the impression of tokens moving down the
line was created by drawing the token in the determined color, pausing the thread
and then redrawing the token in the background color (#FFFFCC) before incrementing
the X position for the token placement.