From 021e5f749626ca5e73b024f20b9ee2253317b70e Mon Sep 17 00:00:00 2001 From: Baudinet Charles Date: Fri, 5 Jun 2020 14:47:54 +0200 Subject: [PATCH] Update Doc Core and CLI --- src/cli/commands/RentBicycle.java | 1 - src/cli/commands/RunTest.java | 10 ++++++++++ src/cli/commands/SortStation.java | 4 ++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/cli/commands/RentBicycle.java b/src/cli/commands/RentBicycle.java index ead3fff..25bf2b1 100644 --- a/src/cli/commands/RentBicycle.java +++ b/src/cli/commands/RentBicycle.java @@ -44,7 +44,6 @@ public static void main(String[] args) { System.out.println("You cannot rent a bicycle"); System.out.println("The station id or/and user id do not exist"); } - // TODO: Study parameters } } diff --git a/src/cli/commands/RunTest.java b/src/cli/commands/RunTest.java index 8ca6d3c..c0ed096 100644 --- a/src/cli/commands/RunTest.java +++ b/src/cli/commands/RunTest.java @@ -106,6 +106,11 @@ public static boolean hasGoodInput(String[] args) { } } + /** + * This method reads text file + * @param fileName: name of the file we want to read + * @return: string that wad contained in the fileName + */ public static List readTextFile(String fileName) { List returnValue = new ArrayList<>(); @@ -145,6 +150,11 @@ public static List readTextFile(String fileName) { } + /** + * This method writes in a text file + * @param fileName: name of the file we want to read + * @param s: what we want to write in the file + */ public static void writeTextFile(String fileName, String s) { FileWriter output = null; try { diff --git a/src/cli/commands/SortStation.java b/src/cli/commands/SortStation.java index 8a1b13c..76059e8 100644 --- a/src/cli/commands/SortStation.java +++ b/src/cli/commands/SortStation.java @@ -103,6 +103,10 @@ public static boolean hasGoodInput(String[] args) { } + /** + * Strategy to order station by the most used + * @param args: system we want to analyze + */ private static void mostUsedStationStrategy(String[] args) { System.out.println("The sortStation command without policies (will show the most used policy)"); List systems = CoreApp.getSystems();