Skip to content

Commit

Permalink
weighing-machine: Clarify return type for display property (#2174)
Browse files Browse the repository at this point in the history
  • Loading branch information
iHiD authored Sep 5, 2023
1 parent 7f388ef commit 0748ed9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exercises/concept/weighing-machine/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ var wm = new WeighingMachine(precision: 3);

## 6. Allow the weight to be retrieved

Implement the `WeighingMachine.DisplayWeight` property which shows weight after tare adjustment and with the correct precision applied:
Implement the `WeighingMachine.DisplayWeight` property which should return a string showing the weight after tare adjustment, with the correct precision applied, and the unit added.
Note that:
``` display-weight = input-weight - tare-adjustment ```

```csharp
var wm = new WeighingMachine(precision: 3);
wm.TareAdjustment = 10;
wm.Weight = 60.567;
wm.TareAdjustment = 10;

// => wm.DisplayWeight == "50.567 kg"
```

0 comments on commit 0748ed9

Please sign in to comment.