Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update hints.md in Captains Log #2833

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion exercises/concept/captains-log/.docs/hints.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@

- Java does not provide a function to choose an element from a collection at random.
- Remember that you can retrieve an element from an array by its index, which is an integer.
- The `java.util.Random` class provides a method to generate a random `int` between 0 and a given maximum.
Copy link
Member

@kahgoh kahgoh Aug 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this have the same inclusivity / exclusivity problem? The hint for Generate a random stardate might also have this problem.

What do you think about using a general hint for the inclusivity / exclusivity instead? A general hint would be placed before the hints for the first task (see the hints for Annalyn's infiltration for an example).


## 2. Generate a random starship registry number

- The `java.util.Random` class provides a method to generate a random `int` between 0 and a given maximum.
- The `java.util.Random` class provides another method to generate a random `int` between given minimum (inclusive) and a given maximum (exclusive).

## 3. Generate a random stardate

Copy link
Member

@kahgoh kahgoh Aug 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed the very last hint (on line 15) seems to be missing a couple of words between class and method (sorry, for some reason Github isn't letting me put this comment on the last line). It currently says:

The java.util.Random class method to generate a random double always returns a number between 0.0 and 1.0

Would you mind fixing it?

Expand Down