package com.example;

public class ShipService {

    private ShipTracker shipTracker;

    public ShipService(ShipTracker tracker) {
        this.shipTracker = tracker;
    }

    public Ship getShipWithCurrentPosition(String shipName) {

        Position shipPosition = this.shipTracker.getPositionForShipName(shipName);
        return new Ship(shipName, shipPosition);

    }

}
