Practice: Parameters

Take out a piece of paper. We’ll be programming on paper.

Write Java code for the following problems.

Problem 1

Write a public static subroutine sayHi that has one parameter name a String that prints out ‘Hello name’.

Problem 2

Write a public static subroutine countDown that has one parameter limit an int that counts down from limit to 0 by fives and prints the numbers as it goes.

Problem 3

Write a private static subroutine evenNumbers with two parameters, start an int and end an int, that prints out the even numbers from start to end.

Problem 4 (optional)

Work on your top-down design for Homework 5.

Show me your code before you leave