| 2 | import BehaviouralDesignPatterns.StrategyDesignPattern.WithStrategyPattern.Strategy.DriveStrategyInterface; |
| 3 | |
| 4 | public class Vehicle{ |
| 5 | //object create -> DriveStrategyInterface |
| 6 | DriveStrategyInterface driveStrategyObject; |
| 7 | |
| 8 | //Constructor vehicle class - obj |
| 9 | Vehicle(DriveStrategyInterface driveStrategyObject) { |
| 10 | this.driveStrategyObject = driveStrategyObject; |
| 11 | |
| 12 | } |
| 13 | public void drive(){ |
| 14 | driveStrategyObject.drive(); |
| 15 | } |
| 16 | } |
nothing calls this directly
no outgoing calls
no test coverage detected