001 /**
002 * Beispielprogramm aus der Info1-Vorlesung
003 * zur Umrechnung von Geschwindigkeiten und für Methoden.
004 *
005 * @author Christian Pape
006 *
007 */
008 public class Geschwindigkeit {
009
010 /**
011 * @param args
012 */
013 public static void main(String[] args) {
014 double kmh = 120;
015
016 double mph1 = berechneMph(kmh);
017 double mph2 = berechneMph(kmh * 2.0);
018 }
019
020 public static double berechneMph(double kmh) {
021 double mph = kmh * 0.621;
022 return mph;
023 }
024 }