Skip to content

Commit

Permalink
Update task.md
Browse files Browse the repository at this point in the history
language checked
  • Loading branch information
stephen-hero authored and onewhl committed Jan 24, 2024
1 parent 5b07125 commit c6059b8
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
### Task

In this task, there are three files:
- `Animal` - base interface for different animal types, it contains several methods.
- `Animal` - the base interface for different animal types, it contains several methods.
- `Cat` - represents a cat and implements the Animal interface.
- `Dog` - represents a dog and implements the Animal interface.

Take a look at the `Cat` and `Dog` classes and identify one method and properties that are not specific to animal type
and move them to the base interface `Animal` using the Pull Up refactoring.
Take a look at the `Cat` and `Dog` classes and identify any methods and properties that are not specific to animal type.
Move them to the base interface `Animal` by using the Pull Up refactoring.

### Hints

Expand All @@ -18,5 +18,5 @@ Use the &shortcut:Refactorings.QuickListPopupAction; (macOS) or `Shift+Ctrl+Alt+

<div class="hint" title="Refactoring Hint">

Pull Up `play()` method to the `Animal` interface and add `override` modifier before its implementations in `Cat` and `Dog` classes.
Pull Up the `play()` method to the `Animal` interface and add the `override` modifier before its implementations in both the `Cat` and `Dog` classes.
</div>

0 comments on commit c6059b8

Please sign in to comment.