FizzBuzz, Enterprise Edition

By Jimmy

Those of you who have been keeping up with the programming blogosphere have probably heard of FizzBuzz by now. Well, in the spirit of this, I decided to create my own overly complicated FizzBuzz: FizzBuzz, Enterprise Edition.

As we all know, Java is the best language for writing enterprise applications, so that’s what I went with. Here’s a quick overview of the code:

  • The FizzBuzz class is where most work is done. This class is a Singleton since we only create one instance of it.
  • The doFizzBuzzApplication() method generates a list of Number objects by reading a file containing all the numbers from 1 to 100.
  • It then creates a new instance of the FizzBuzzOutputManager class, sending it the list of Numbers to be printed.
  • The doOutput() method of the FizzBuzzOutputManager class goes through the Number list, checking if the current object is an instance of numberDivisibleByThree, numberDivisibleByFive, etc. It then prints out the appropriate message on the screen.
  • Like all good enterprise applications, there’s a lot of code in there from past versions that does absolutely nothing. The program also generates a few worthless files when it runs.

You can download the source here.

This shouldn’t be too hard to out-enterprise (especially if you throw in some SOAP web services…). If anyone else has an unnecessarily complicated FizzBuzz, I’d love to see it.

3 Responses to “FizzBuzz, Enterprise Edition”

  1. Enigma Says:

    How about a version in COBOL? Can’t get more enterprise or convoluted than that:

    http://www.fileden.com/files/2007/3/4/851496/fizzbuzz-contest-2.cob

    Compiles on the OpenCOBOL.org compiler.

    Disclaimer: I never coded COBOL in an enterprise, I’m just twisted enough to use it.

  2. $anchor$basketball Betting,final Four,final Four Betting,final Four Gambling,final Four Sports Book,final Four Sportsbook,march Madness,march Madness Betting,march Madness Gambling,march Madness Sports Book,march Madness Sportsbook,ncaa,ncaa Betting,ncaa Says:

    $anchor$basketball Betting,final Four,final Four Betting,final Four Gambling,final Four Sports Book,final Four Sportsbook,march Madness,march Madness Betting,march Madness Gambling,march Madness Sports Book,march Madness Sportsbook,ncaa,ncaa Betting,…

    $anchor$basketball Betting,final Four,final Four Betting,final Four Gambling,final Four Sports Book,final Four Sportsbook,march Madness,march Madness Betting,march Madness Gambling,march Madness Sports Book,march Madness Sportsbook,ncaa,ncaa Betting,nc…

  3. feng shui massachusetts Says:

    feng shui massachusetts…

    feng shui massachusetts…

Leave a Reply