Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ist-4-jav
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alice Brenon
ist-4-jav
Commits
5bad357b
Commit
5bad357b
authored
3 years ago
by
Alice Brenon
Browse files
Options
Downloads
Patches
Plain Diff
Fix typos in Worksheet3
parent
d633e11e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Worksheet/Worksheet3.md
+3
-3
3 additions, 3 deletions
Worksheet/Worksheet3.md
with
3 additions
and
3 deletions
Worksheet/Worksheet3.md
+
3
−
3
View file @
5bad357b
...
@@ -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[]`
$
\
n
eq$
`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 blo
g
handling
`quit`
set it to
`false`
and initialized to
`true`
and make the blo
ck
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment