Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion Project/OSTask1/src/CustomerManagerApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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() {
Expand Down Expand Up @@ -93,4 +103,4 @@ public static void deleteCustomer() {
System.out.println("No customer matches that email.\n");
}
}
}
}
3 changes: 3 additions & 0 deletions student.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**name : alaa ali abdaltif ali hendam**<br/>
**section : 4**<br/>
![alt text](https://drive.google.com/file/d/1AbSVPFgs0Cbma2ES0w2Cf7z8DIyk3JZg/view)