class HoltWintersSimpleTrainingModel {

    public void observeAndTrain(double y, HoltWintersPointForecasterParams params, HoltWintersOnlineComponents components) {
        checkNulls(params, components);
        checkTrainingMethod(params);
        checkStillInInitialTraining(params);
        int frequency = params.getFrequency();

        // Capture data points
        if (isBetween(n, 0, frequency - 1)) {
            firstCycle[n] = y;
        } else {
            secondCycle[n - frequency] = y;
        }
        // Train
        if (n == params.calculateInitTrainingPeriod() - 1) {
            setLevel(components);
            setSeasonals(y, params, components);
            setBase(params, components);
            updateComponentsAndForecast(params, components);
        }
        n++;
    }

    public  HoltWintersSimpleTrainingModel(HoltWintersPointForecasterParams params);

}