]> Git Server - tankstelle.git/commitdiff
Corrected some spelling errors
authorRobin Cheney <cheneyr@eternal.ddnss.de>
Sun, 16 Nov 2025 09:11:12 +0000 (10:11 +0100)
committerRobin Cheney <cheneyr@eternal.ddnss.de>
Sun, 16 Nov 2025 09:13:57 +0000 (10:13 +0100)
src/main/java/de/diejungsvondertanke/tankstelle/Main.java

index f26d80ac062eebbe4cbce0635baa98434aaa7402..c06085ea0a2f0e86385a1f9d69a7e6a3f52d246a 100644 (file)
@@ -96,7 +96,7 @@ public class Main {
         return highestStation;
     }
 
-        /**
+    /**
      * Get the FuelStation with the highest price
      * 
      * 
@@ -104,18 +104,19 @@ public class Main {
      * 
      * @return a FuelStation (all of type {@link FuelStation})
      */
-    public static FuelStation getHighestAccumulatedWorth() throws NoSuchFuelTypeError {
-        float highestWorth = fuelStations[0].get_cumulative_retail_price();
+    public static FuelStation getHighestAccumulatedValue() throws NoSuchFuelTypeError {
+        float highestValue = fuelStations[0].get_cumulative_retail_price();
         FuelStation highestStation = fuelStations[0];
         for (FuelStation fuelStation : fuelStations) {
-            if (fuelStation.get_cumulative_retail_price() > highestWorth) {
-                highestWorth = fuelStation.get_cumulative_retail_price();
+            if (fuelStation.get_cumulative_retail_price() > highestValue) {
+                highestValue = fuelStation.get_cumulative_retail_price();
                 highestStation = fuelStation;
             }
         }
         return highestStation;
     }
-      /**
+
+    /**
      * Get the FuelStation with the stored fuel
      * 
      * 
@@ -123,18 +124,19 @@ public class Main {
      * 
      * @return a FuelStation (all of type {@link FuelStation})
      */
-    public static FuelStation getHighestStoredAmount(FuelType fuelType) throws NoSuchFuelTypeError{
-        float highestAmound = fuelStations[0].getStored_amount(fuelType);
+    public static FuelStation getHighestStoredAmount(FuelType fuelType) throws NoSuchFuelTypeError {
+        float highestAmount = fuelStations[0].getStored_amount(fuelType);
         FuelStation highestStation = fuelStations[0];
         for (FuelStation fuelStation : fuelStations) {
-            if (fuelStation.getStored_amount(fuelType) > highestAmound) {
-                highestAmound = fuelStation.getStored_amount(fuelType);
+            if (fuelStation.getStored_amount(fuelType) > highestAmount) {
+                highestAmount = fuelStation.getStored_amount(fuelType);
                 highestStation = fuelStation;
             }
         }
         return highestStation;
     }
-      /**
+
+    /**
      * Get the FuelStation with the lowest fuel
      * 
      * 
@@ -142,20 +144,21 @@ public class Main {
      * 
      * @return a FuelStation (all of type {@link FuelStation})
      */
-        public static FuelStation getLowerstStoredAmount(FuelType fuelType) throws NoSuchFuelTypeError{
-        float LowestAmound = fuelStations[0].getStored_amount(fuelType);
-        FuelStation LowestStation = fuelStations[0];
+    public static FuelStation getLowestStoredAmount(FuelType fuelType) throws NoSuchFuelTypeError {
+        float lowestAmount = fuelStations[0].getStored_amount(fuelType);
+        FuelStation lowestStation = fuelStations[0];
         for (FuelStation fuelStation : fuelStations) {
-            if (fuelStation.getStored_amount(fuelType) > LowestAmound) {
-                LowestAmound = fuelStation.getStored_amount(fuelType);
-                LowestStation = fuelStation;
+            if (fuelStation.getStored_amount(fuelType) > lowestAmount) {
+                lowestAmount = fuelStation.getStored_amount(fuelType);
+                lowestStation = fuelStation;
             }
         }
-        return LowestStation;
+        return lowestStation;
     }
 
     /**
-     * Check {@code pin} for the correct PIN number
+     * Check {@code pin} for the correct PIN number (read from the resource
+     * /pin.txt)
      * 
      * @param pin the PIN to check
      * @return true, if the pin is correct, false otherwise