/** *
 *  IterationTest.java
 *
 *  Revisions: 1.0 Sep. 02, 2002
 *               Created the IterationTest class
 *             1.1 Sep. 03, 2002
 *               Compiled, Finished, Tested, Commented
 *
 *  
* * Collaboration Statement: * I worked on the homework assignment alone, using only * course materials. * * Created with JCreatorLE, some indents are off when viewed through notepad * or EMACS * * @author Jose Manuel Caban * @version Version 1.1, Sep. 02, 2002 */ public class IterationTest { public static final boolean bDebug = false; /** * Prints the specified message the specified number of times. *
* For example: printMessageALot("5 times!",5) would print * 5 times! * 5 times! * 5 times! * 5 times! * 5 times! *

* @param message the message to print * @param count the number of times to print the message */ public void printMessageALot(String message, int count) { if(bDebug){ System.out.println("Begin iteration"); } //actual code for(int i = 0; i * For example: power(4,3) would return 4 * 4 * 4 = 64 *

* @param base the number to raise to the power * @param exponent the power to raise the base to (will always be greater * then 0) * @return the base raised to the exponent */ public int power(int base, int exponent) { int current = base; if(bDebug){ System.out.println("Begin iteration"); } //actual code for(int i=1; i
* @param args a String array of command line arguments. */ public static void main(String[] args) { IterationTest iterationtest = new IterationTest(); //HelloWorld to the XTREME!!! Live the eXPerience!!! iterationtest.printMessageALot("Hello World!",5); System.out.println(iterationtest.power(2,2)); System.out.println(iterationtest.power(3,3)); }// end of main(String[] args) }// end of class IterationTest