File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
RefactoringToDesignPatterns/FactoryMethodPatternPractice/Practice Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
### Task
2
2
3
- - Create a class ` TransportationServiceFactory ` with the ` getTransportation(String transport) ` method .
4
- This method should return an appropriate transportation based on the given transport name, using the ` switch `
3
+ - Create a class named ` TransportationServiceFactory ` with a method called ` getTransportation(String transport) ` .
4
+ This method should return the appropriate transportation based on the given transport name, using the ` switch `
5
5
construction.
6
6
7
- - In the main method, create an instance of ` TransportationServiceFactory ` class, add an invocation of
8
- the ` getTransportation ` method, and invoke ` drive ` method.
7
+ - In the main method, create an instance of the ` TransportationServiceFactory ` class, add an invocation of
8
+ the ` getTransportation ` method, and invoke the ` drive ` method.
9
9
10
10
### Hints
11
11
12
12
<div class =" hint " title =" Where to start? " >
13
13
14
14
The file where you should write the code is already open.
15
- Please, create a new class named ` TransportationServiceFactory ` and implement ` getTransportation ` method.
15
+ Please create a new class named ` TransportationServiceFactory ` and implement the ` getTransportation ` method.
16
16
</div >
17
17
18
18
<div class =" hint " title =" How should TransportationServiceFactory class look? " >
You can’t perform that action at this time.
0 commit comments