Skip to content
Snippets Groups Projects
Commit 5bad357b authored by Alice Brenon's avatar Alice Brenon
Browse files

Fix typos in Worksheet3

parent d633e11e
No related branches found
No related tags found
No related merge requests found
...@@ -34,7 +34,7 @@ title: Worksheet 3 ...@@ -34,7 +34,7 @@ title: Worksheet 3
- Create a class called `Sum` to hold an array of integers and expose a method - Create a class called `Sum` to hold an array of integers and expose a method
computing their sum computing their sum
- Create a main class to pass all the command-line arguments to this function - 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 - Compile and test
- Add a new class called `Product` to the `fr.insa_lyon.ist_4_jav.calculator` - 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 package doing what you expect (the same as `Sum` with the product of all the
...@@ -52,14 +52,14 @@ title: Worksheet 3 ...@@ -52,14 +52,14 @@ title: Worksheet 3
- Start over from the greeter, but modify it to read the name of the person from - 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 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 - Print a message explaining that the user should enter their name before the
call to the previous function call to the previous function
- Compile and test - Compile and test
- Modify it to detect if the user entered the litteral value `quit` and print a - Modify it to detect if the user entered the litteral value `quit` and print a
special message in that case special message in that case
- Add a boolean variable to hold whether the program should keep running or not - 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 - 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 of this variable to continue, and simply keep printing the name otherwise
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment