From fd24672e9ef82534dfb756f06b56e808bb9c6c9a Mon Sep 17 00:00:00 2001 From: habebamohamed <47828560+habebamohamed@users.noreply.github.com> Date: Fri, 27 Mar 2020 00:12:16 +0200 Subject: [PATCH] edit the source code --- Project/OSTask1/src/CustomerManagerApp.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Project/OSTask1/src/CustomerManagerApp.java b/Project/OSTask1/src/CustomerManagerApp.java index 2a27245..c161cd1 100644 --- a/Project/OSTask1/src/CustomerManagerApp.java +++ b/Project/OSTask1/src/CustomerManagerApp.java @@ -22,15 +22,15 @@ public static void main(String[] args) { action = Console.getString("Enter a command: "); System.out.println(); - if (action.equalsIgnoreCase("list")) { + if (action.equalsIgnoreCase(1)) { displayAllCustomers(); - } else if (action.equalsIgnoreCase("add")) { + } else if (action.equalsIgnoreCase(2)) { addCustomer(); - } else if (action.equalsIgnoreCase("del") || action.equalsIgnoreCase("delete")) { + } else if (action.equalsIgnoreCase(3) || action.equalsIgnoreCase("delete")) { deleteCustomer(); - } else if (action.equalsIgnoreCase("help") || action.equalsIgnoreCase("menu")) { + } else if (action.equalsIgnoreCase(4) || action.equalsIgnoreCase("menu")) { displayMenu(); - } else if (action.equalsIgnoreCase("exit")) { + } else if (action.equalsIgnoreCase(5)) { System.out.println("Bye.\n"); } else { System.out.println("Error! Not a valid command.\n"); @@ -93,4 +93,4 @@ public static void deleteCustomer() { System.out.println("No customer matches that email.\n"); } } -} \ No newline at end of file +}