diff --git a/Worksheet/Worksheet3.md b/Worksheet/Worksheet3.md index f20afb50cb56d87ba9873ddd86f8ec6da18a9df2..34d1bf749dd486e19496ecaefa5d39885648ec2d 100644 --- a/Worksheet/Worksheet3.md +++ b/Worksheet/Worksheet3.md @@ -34,7 +34,7 @@ title: Worksheet 3 - Create a class called `Sum` to hold an array of integers and expose a method computing their sum - Create a main class to pass all the command-line arguments to this function - and print the result (don't forget the types ! `String[]` $neq$ `int[]`) + and print the result (don't forget the types ! `String[]` $\neq$ `int[]`) - Compile and test - Add a new class called `Product` to the `fr.insa_lyon.ist_4_jav.calculator` package doing what you expect (the same as `Sum` with the product of all the @@ -52,14 +52,14 @@ title: Worksheet 3 - Start over from the greeter, but modify it to read the name of the person from standard input instead of from the command-line the program was called on - (look up `System.in.read` and friends for usage and help) + (look up `System.console.readLine()` and friends for usage and help) - Print a message explaining that the user should enter their name before the call to the previous function - Compile and test - Modify it to detect if the user entered the litteral value `quit` and print a special message in that case - Add a boolean variable to hold whether the program should keep running or not - and initialized to `true` and make the blog handling `quit` set it to `false` + and initialized to `true` and make the block handling `quit` set it to `false` - Now modify the main function to become a `while` loop which checking the state of this variable to continue, and simply keep printing the name otherwise