The FizzBuzz program is used by some employers to test the programming abilities of the workers that they are attempting to hire. FizzBuzz is a simple program that loops through numbers 1-100 and prints out "Fizz" if the number is a multiple of 3, "Buzz" if the number is a multiple of 5 and "FizzBuzz" if the number is a multiple of both 3 and 5.
Ready, set, go!
The FizzBuzz program took me a total of 5 minutes to complete including the time it took to write comments. Below is the code that I implemented:
Errors
Unfortunately I ran into errors with Eclipse during this project. It started with Eclipse taking close to 2 minutes to open and eventually to its current state where it will not even boot up. Because I had no time to spare while doing this project I hastily tried uninstalling and reinstalling Eclipse with no change in its behavior so I turned to the next best thing and used a program called Notepad ++ to code my FizzBuzz. While this is a lot harder than using a compiler as it does not correct your coding should there be an error, it is manageable with such a small program as this one. I will continue to work on solving this problem and hopefully will have Eclipse up and running again by the end of tonight.
Lessons learned
Through this experience I have learned that there is no substitute for a good compiler as it makes coding and testing a java file easier since the compiler will tell you when you have an error in your code and you can also test the file in the compiler instead of using the command line.
Sunday, August 30, 2009
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment