package tourplaner.object;

import java.time.LocalDate;

public class Log {
    private String id, bemerkung, rating;
    private LocalDate datum;
    private double strecke, avgspeed, hightmeter, pause, dauer, gegangen;

    public Log(String id, double dauer, LocalDate datum, double strecke, String bemerkung, double hightmeter, double pause, String rating) {
        this.id = id;
        this.dauer = dauer;
        this.datum = datum;
        this.strecke = strecke;
        this.bemerkung = bemerkung;
        this.hightmeter = hightmeter;
        this.pause = pause;
        this.rating = rating;
        this.gegangen = this.dauer - this.pause;
        this.avgspeed = this.strecke / (this.gegangen/60);
        if(Double.isInfinite(this.avgspeed)){
            this.avgspeed = -1;
        }
    }

    public String getRating() {
        return rating;
    }

    public String getBemerkung() {
        return bemerkung;
    }

    public double getAvgspeed() {
        return avgspeed;
    }

    public void setAvgspeed(double avgspeed) {
        this.avgspeed = avgspeed;
    }

    public double getHightmeter() {
        return hightmeter;
    }

    public double getPause() {
        return pause;
    }

    public double getGegangen() {
        return gegangen;
    }

    public String getId() {
        return id;
    }

    public double getDauer() {
        return dauer;
    }

    public LocalDate getDatum() {
        return datum;
    }

    public double getStrecke() {
        return strecke;
    }

}
