Monday, August 29, 2011

FizzBuzz for fun and profit!

The following program was created using Eclipse as a starter to get used to Eclipse. I have not used eclipse before, but I have used other GUI based editors. I usually use jgrasp or my personal favorite is just to open up a text editor such as notepad, to write my java programs. I know that using only a text editor is bad, but the programming language I am most familiar with is C/C++ and with those languages I am most comfortable using a text editor to create my programs.



It took me about 3 or so minutes to get through the tutorial on getting used to Eclipse and all the menus. The actual FizzBuzz program took me about 10 minutes or so to get everything set up and use the programming editor to create the program. Learning to use the new editor did not take that much time and it looks much more powerful than jgrasp.

The FizzBuzz program was fast and easy to create and I did not that much trouble with it. Remembering to create a new object rather than to declare the contained method as a static was the only difficulty that I had encountered besides learning how to use Eclipse.

I noticed that Eclipse usually suggests to turn a method inside the class into a static method, rather than to create another object. It depends on how the programmer and the program is configured to run that should determine how methods are declared. If the program wants to be a small as possible and use little memory, then declaring a method as static might reduce memory that could be used by declared objects. Otherwise, declaring a new object sounds like the better workaround.

By learning Eclipse, I now have another resource that I can use to help me create programs and to verify their correctness.

No comments:

Post a Comment