"Hi, Amigo. I’d like to give you a couple of tasks:"
7
Task
New Java Syntax, level 7, lesson 4
Minimum of two numbers
Write a function that returns the minimum of two numbers.
Hint:
You need to write the body of the existing min function.
7
Task
New Java Syntax, level 7, lesson 4
Minimum of three numbers
Write a function that computes the minimum of three numbers.
Hint:
You need to write the body of the existing min function.
7
Task
New Java Syntax, level 7, lesson 4
Minimum of four numbers
Write a function that computes the minimum of four numbers.
The function min(a, b, c, d) should use (call) the function min(a, b)
Hint:
You need to write the body of the two existing min functions.
7
Task
New Java Syntax, level 7, lesson 4
Repetition is the mother of all learning
Implement the print3 method. The method should display the passed string 3 times. Each time, on a new line.
7
Task
New Java Syntax, level 7, lesson 4
Print three times
Implement the print3 method. The method should display the passed string (word) three times, but on the same line.
Words must be separated by a space and should not merge into one.
7
Task
New Java Syntax, level 7, lesson 4
Even to the moon!
"Amigo, did you know that lunar gravity is about 17% of gravity on Earth?"
"Nope."
"Neither did I. Now this information will be used a lot. To avoid having to manually calculate it each time,
implement a getWeight(int) method that takes a person's body weight on Earth (in newtons), and returns the w