skip to main |
skip to sidebar
The FizzBuzz program is a simple program some interviewers use to test basic programming skills of applicants. The FizzBuzz program counts from 1 to 100 and prints out “Fizz” if the number is divisible by 3, “Buzz” if the number is divisible by 5, “FizzBuzz” if the number is divisible by both 3 and 5, and the number itself otherwise. The code for the FizzBuzz program is shown below.
public class fizzbuzz {
public static void main(String[] args) {
// Loop 1 through 100
for(int i = 1; i <= 100; i++){
// Display FizzBuzz if i is divisible by 3 and 5
if(i % 15 == 0){
System.out.println("FizzBuzz");
}
// Display Fizz if i is divisible by 3
else if(i % 3 == 0){
System.out.println("Fizz");
}
// Display Buzz if i is divisible by 5
else if(i % 5 == 0){
System.out.println("Buzz");
}
// Display number if i is not divisible by 3 or 5
else{
System.out.println(i);
}
}
}
}
It took me about 5 minutes to implement this program and verify the output was accurate. I didn’t run into any real problems, except that I couldn’t remember some of the syntax. Luckily, the Eclipse IDE auto-complete assisted with this problem. This experience helped me realize that programming, like other skills, need to be practiced to keep them sharp. Thankfully, IDEs, like Eclipse, exist to make life easier. Through the programming assignments in this class, I hope to sharpen my programming skills and become a more efficient programmer.
Overview:
Sweet Home 3D by eTeks is an open source Java application that assists users with interior designing of their home. It is available for download at http://sourceforge.net/projects/sweethome3d/.
There are three prime directives of open source software engineering that can be used as a measure of how well software is developed.
Prime Directive #1: The system successfully accomplishes a useful task.
This application allows users to create an accurate 2D layout of their residence. After creating a home, users are able to use the 2D model to place various pieces of furniture where they choose. This allows the user to experiment with various arrangements of their furniture without having to physically move them. The application also creates a 3D preview of the home to give users a more accurate idea of how their furnished home will look.
Prime Directive #2: An external user can successfully install and use the system.
Installation of this application was quick and easy with the Sweet Home 3D setup wizard which guides you through the installation process. Once Sweet Home 3D is installed, new users can access the Sweet Home 3D help which contains descriptions that explain how to use key features of the program. Additional help resources are available for users at http://www.sweethome3d.eu/documentation.jsp, including a video tutorial. After reviewing the help topics, users can quickly become efficient enough to begin modeling and decorating their home. I was able to create a simple 2D home and begin furnishing it within about 15 minutes. I found that this program was fun and easy to use.
Prime Directive #3: An external developer can successfully understand and enhance the system.
A plug-in developer’s guide, which walks through programming a new plug-in for Sweet Home 3D, is available at http://www.sweethome3d.eu/pluginDeveloperGuide.jsp. Also, the Sweet Home 3D source code and developer’s javadoc API is available at http://www.sweethome3d.eu/download.jsp. The source code contains comments to assist developers to understand and modify the code to meet their needs. The Sweet Home 3D API contains a thorough library of classes and methods used to create the Sweet Home 3D application. I think developers would be able to expand the capabilities of this application without much trouble after reviewing the source code and API.