Challenges

Remember the rules for this are

  • Try to use only the information given up to this point in this book.
  • Try not to give up until you've given it a solid attempt

Challenge 1.

Declare a method named printSquare. When invoked it should print a square.

*****
*****
*****
*****
// CODE HERE

void main() {
    printSquare();
}

Challenge 2.

Declare a method named printSquareThreeTimes. When invoked it should print three squares by invoking a method named printSquare three times.

// CODE HERE

// Code from challenge 1 here

void main() {
    printSquareThreeTimes();
}

Challenge 3.

Write a program that contains at least four methods. Have fun with it.

void main() {
    // sing a song or something.
}