From f2f69d62abb74fe212ac96ea380c57bdf72b3d4e Mon Sep 17 00:00:00 2001 From: zanninso Date: Sun, 5 May 2024 19:39:53 +0100 Subject: [PATCH] docs: fixing test example and adding more information to clarify --- subjects/java/checkpoints/unit-converter/README.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/subjects/java/checkpoints/unit-converter/README.md b/subjects/java/checkpoints/unit-converter/README.md index 859191e85..d2a743680 100644 --- a/subjects/java/checkpoints/unit-converter/README.md +++ b/subjects/java/checkpoints/unit-converter/README.md @@ -2,7 +2,7 @@ ### Instructions -In a file named `UnitConverter.java`, write a function `convert` that returns the result of a unit conversion specified in the parameters. The function should handle different types of unit conversions based on the input parameters which specify the unit from, the unit to, and the value to be converted. +In a file named `UnitConverter.java`, write a function `convert` that returns the result of a unit conversion specified in the parameters. The function should handle different types of unit conversions based on the input parameters which specify the unit from, the unit to, and the value to be converted. In case of an error print `ERROR` ##### Request conversions @@ -32,11 +32,7 @@ public class ExerciseRunner { System.out.println(UnitConverter.convert(new String[]{"fahrenheit", "celsius", "212"})); System.out.println(UnitConverter.convert(new String[]{"kilometers", "miles", "5"})); System.out.println(UnitConverter.convert(new String[]{"pounds", "kilograms", "10"})); - if (args.length == 3) { - System.out.println(UnitConverter.convert(args)); - } else { - System.out.println("Usage: java ExerciseRunner "); - } + System.out.println(UnitConverter.convert(args)); } } ```