Parameter Mystery

Category: Parameter Mystery
Author: Marty Stepp
Book Chapter: 3.1
Problem: Parameter Mystery
	At the bottom of the page, write the output produced by the following program, as it would appear on the console. (Though the program uses words related to chess, the output does not necessarily relate to real chess game rules.) 

public class ParameterMystery {
	public static void main(String[] args) {
		String knight = "rook";
		String king = "pawn";
		String bishop = "knight";
		String pawn = "queen";
		String rook = bishop;
		chess(knight, king, bishop);
		chess(bishop, knight, king);
		chess(king, pawn, "queen");
		bishop = "king";
		chess("bishop", rook, knight);
		chess(pawn, bishop, bishop);
	}
	public static void chess(String b, String c, String a) {
		System.out.println("A " + a + " and a " + b + " beats a " + c);
	}
}

1) chess(knight, king, bishop);
2) chess(bishop, knight, king);
3) chess(king, pawn, "queen");
4) chess("bishop", rook, knight);
5) chess(pawn, bishop, bishop);