diff --git a/src/de/hsmannheim/informatik/name/domain/starwars/R2D2.java b/src/de/hsmannheim/informatik/name/domain/starwars/R2D2.java index 786aa11..998d0b9 100644 --- a/src/de/hsmannheim/informatik/name/domain/starwars/R2D2.java +++ b/src/de/hsmannheim/informatik/name/domain/starwars/R2D2.java @@ -22,9 +22,16 @@ public class R2D2 extends StarWarsRobot { return 0 <= id && id <= 9999; } + /** + * R2D2 think method sorts numbers with selection sort + * @param numbers integer numbers for sorting + * @return arrayToSort integer array with numbers sorted in ascending order + * @throws RobotException + * @throws RobotMagicValueException + */ @Override - public int[] think(int[] zahlen) throws RobotException, RobotMagicValueException { - int[] arrayToSort = zahlen.clone(); + public int[] think(int[] numbers) throws RobotException, RobotMagicValueException { + int[] arrayToSort = numbers.clone(); for (int i = 0; i < arrayToSort.length; i++) { if (arrayToSort[i] == MAGIC_NUMBER) { throw new RobotMagicValueException(String.format("Appearance of Magic Number: %d", MAGIC_NUMBER), this);