// Repraesentiert einen Eintrag im Lauftagebuch class Entry{ Date d; double distance; // in km int duration; // in min String comment; // requires duration != 0 Entry(Date d, double distance, int duration, String comment) { this.d = d; this.distance = distance; this.duration = duration; this.comment = comment; } // Durchschnittsgeschwindigkeit in km/h double calculateSpeed() { double h = duration / 60.0; return distance / h; } public String toString() { return this.d.toString() + " " + this.distance + " km " + " in " + this.duration + " min; " + this.comment; } }