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

Clarify exercise prompt for MultiplierWithOffset #41

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ object FunctionsAndMethods:
def multiply(x: Int, y: Int): Int = x * y
// [end]

// Exercise: Create a subclass of `Multiplier` named `MultiplierWithOffset` that has an internal state `offset`.
// Exercise: Create a subclass of `Multiplier` named `MultiplierWithOffset` whose constructor requires an `offset` parameter.
// Override the `multiply` method to add the `offset` to the product of the two input integers.
// [start: MultiplierWithOffset]
class MultiplierWithOffset(offset: Int) extends Multiplier:
Expand Down
2 changes: 1 addition & 1 deletion Functions as Data/what_is_a_function/task-info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ files:
- offset: 662
length: 63
placeholder_text: /* TODO */
- offset: 988
- offset: 1001
length: 138
placeholder_text: /* TODO */
- name: test/FunctionsAndMethodsSpec.scala
Expand Down