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 9ee05fa commit a74b183
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

- Then, within the `Main::main()` method, identify the statements specifically related to video conversion – these
should
cover loading, processing, encoding, and saving the video. After identifying them, extract these statements into a new
cover the loading, processing, encoding, and saving of the video. After identifying them, extract these statements into a new
method.
Name this method `convertVideo` and ensure it accepts two parameters, both of the `String` type.
Then, move this method to the `VideoConversionFacade` class and make it `public`.

- Additionally, transfer the declarations of `videoLoader`, `videoProcessor`, `videoEncoder`,
- Additionally, transfer the declarations for `videoLoader`, `videoProcessor`, `videoEncoder`,
and `videoSaver` to become `private` properties of the `VideoConversionFacade` class.

- Finally, change the main method: it should create an instance of the `VideoConversionFacade` class and invoke
Expand All @@ -22,19 +22,19 @@
<div class="hint" title="Where to start?">

The file where you should write the code is already open.
Please, create a new empty class named `VideoConversionFacade`.
Please create a new empty class named `VideoConversionFacade`.
</div>

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

In the `Main` file, identify the statements within the `main` method that handle video conversion.
Apply the extract method refactoring on these statements and name the resulting method as `convertVideo`.
Apply the extract method refactoring to these statements and name the resulting method `convertVideo`.
Then, you'll need to manually transfer this newly-formed method to the `VideoConversionFacade` class.

</div>

<div class="hint" title="How to fix main method?">

In `main` method, you need to create a new instance of the `VideoConversionFacade` class and then call
In the `main` method, you need to create a new instance of the `VideoConversionFacade` class and then call
the `convertVideo` method, passing in two parameters: `originalMethodName` and `convertedMethodName`.
</div>

0 comments on commit a74b183

Please sign in to comment.