From cdada3d4b249240c000e634674e23ac94fd197b1 Mon Sep 17 00:00:00 2001
From: alaahendam <47250751+alaahendam@users.noreply.github.com>
Date: Thu, 26 Mar 2020 02:22:56 +0200
Subject: [PATCH 1/2] student.md
---
student.md | 3 +++
1 file changed, 3 insertions(+)
create mode 100644 student.md
diff --git a/student.md b/student.md
new file mode 100644
index 0000000..d099721
--- /dev/null
+++ b/student.md
@@ -0,0 +1,3 @@
+**name : alaa ali abdaltif ali hendam**
+**section : 4**
+
From 2fdaa4f27aa86eb627936a9753915cdc4946934f Mon Sep 17 00:00:00 2001
From: alaahendam <47250751+alaahendam@users.noreply.github.com>
Date: Thu, 26 Mar 2020 02:31:36 +0200
Subject: [PATCH 2/2] Update CustomerManagerApp.java
---
Project/OSTask1/src/CustomerManagerApp.java | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/Project/OSTask1/src/CustomerManagerApp.java b/Project/OSTask1/src/CustomerManagerApp.java
index 2a27245..3b052e7 100644
--- a/Project/OSTask1/src/CustomerManagerApp.java
+++ b/Project/OSTask1/src/CustomerManagerApp.java
@@ -23,14 +23,19 @@ public static void main(String[] args) {
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");
@@ -45,6 +50,11 @@ public static void displayMenu() {
System.out.println("del - Delete a customer");
System.out.println("help - Show this menu");
System.out.println("exit - Exit this application\n");
+ System.out.println("1 - List all customers");
+ System.out.println("2 - Add a customer");
+ System.out.println("3 - Delete a customer");
+ System.out.println("4 - Show this menu");
+ System.out.println("5 - Exit this application\n");
}
public static void displayAllCustomers() {
@@ -93,4 +103,4 @@ public static void deleteCustomer() {
System.out.println("No customer matches that email.\n");
}
}
-}
\ No newline at end of file
+}