Voting

Category

esoteric language

Bookmarking

Del.icio.us Digg Diigo DZone Earthlink Google Kick.ie
Windows Live LookLater Ma.gnolia Reddit Rojo StumbleUpon Technorati

Language UML

(Sequence)

Date:11/17/05
Author:Bernd Binder
URL:n/a
Comments:2
Info:http://www.uml.org
Score: (3.20 in 112 votes)
UML Sequence Diagram "Lyrics of the song 99 Bottles of Beer"
(x=99)

+--------+                +-----------------------+       +-----------+ 
| Object |                | this : GenerateLyrics |       | SysOutput | 
+--------+                +-----------------------+       +-----------+ 
    :                                :                           :
    :                                :                           :
   +-+                               :                           :
   | |                     1. SetTotalBeers(x)                   :
   | |----------------------------->+-+                          :
   | |                              | | 2. TotalBeers=x          :
   | |                              | |-----+                    :
   | |                              | |     |                    :
   | |                              | |<----|                    :
   | |                              +-+                          :
   | |                               :                           :
   | |                               :                           :
   | |                     3. TakeThemDown()                     :
   | |----------------------------->+-+                          :
   | |                              | |                          :
   | |                              | |4. beers=TotalBeers       :
   | |                              | |   *[beers>1]             : 
   | |                              | |                          :
   | |                              | |-----+                    :
   | |                              | |     |                    :
   | |                              | |     |                    :
   | |                              | +-+<--+                    :
   | |                              |   |                        :
   | |                              |   | <<for>>                :
   | |                              |   |                        :
   | |                              |   |                        :
   | |                              |   | 5. Print(beers + " bottles of
   | |                              |   | beer on the wall, " + beers 
   | |                              |   | + " bottles of beer.\n")
   | |                              |   |---------------------->+-+ 
   | |                              |   |                       | | 
   | |                              |   |                       | | 
   | |                              |   |                       +-+ 
   | |                              |   |                        :
   | |                              |   |                        :
   | |                              |   | 6. Print("Take one down 
   | |                              |   | and pass it around, ") : 
   | |                              |   |---------------------->+-+ 
   | |                              |   |                       | | 
   | |                              |   |                       | | 
   | |                              |   |                       +-+ 
   | |                              |   |                        :
   | |                              |   |                        :
   | |                              |   | 7. Print("beers-1+" bottle
   | |                              |   | of beer on the wall.\n\n") 
   | |                              |   |---------------------->+-+ 
   | |                              |   |                       | | 
   | |                              |   |                       | | 
   | |                              |   |                       +-+ 
   | |                              |   | 8. beers=beers-1       : 
   | |                              |   |-----+                  :
   | |                              |   |     |                  :
   | |                              |   |     |                  :
   | |                              |   +<----+                  :
   | |                              |   |                        :
   | |                              | +-+                        :
   | |                              | |                          :
   | |                              +-+                          :
   | |                               :                           :
   | |                               :                           :
   | |                               :                           :
   | |                9. TakeLastDownAndGoToTheStore()           :
   | |----------------------------->+-+                          :
   | |                              | |                          :
   | |                              | | 10. Print("1 bottle of beer on
   | |                              | | the wall, 1 bottle of beer.\n")
   | |                              | |------------------------>+-+
   +-+                              | |                         | |
                                    | |                         | |
                                    | |                         +-+
                                    | |                          :
                                    | |                          :
                                    | | 11. Print("Take one down and
                                    | | pass it around, no more bottles
                                    | | of beer on the wall.\n\n")
                                    | |------------------------>+-+ 
                                    | |                         | | 
                                    | |                         | | 
                                    | |                         +-+ 
                                    | |                          :
                                    | |                          :
                                    | |                          :
                                    | | 12. Print("No more bottles 
                                    | | of beer on the wall,
                                    | | no more bottles of beer.\n")
                                    | |------------------------>+-+ 
                                    | |                         | | 
                                    | |                         | | 
                                    | |                         +-+ 
                                    | |                          :
                                    | |                          :
                                    | |                          :
                                    | | 13. Print("Go to the store
                                    | | and buy some more, " 
                                    | | + TotalBeers + " bottles of
                                    | | beers on the wall.\n\n)"
                                    | |------------------------>+-+ 
                                    | |                         | | 
                                    | |                         | | 
                                    | |                         +-+ 
                                    | |                          
                                    +-+

Download Source | Write Comment

Alternative Versions

Comments

>>  butze said on 08/12/07 19:41:02

butze This is definitly NOT an esoteric language!

>>  freebirth_one said on 11/17/07 02:53:27

freebirth_one But it's cool. next time starting innovator i'll try it.

Download Source | Write Comment

Add Comment

Please provide a value for the fields Name, Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.

Please don't post large portions of code here! Use the form to submit new examples or updates instead!

Name:

eMail:

URL:

Security Code:
  
Comment: