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
24 changes: 12 additions & 12 deletions Project/OSTask1/src/CustomerManagerApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ public static void main(String[] args) {

// perform 1 or more actions
String action = "";
while (!action.equalsIgnoreCase("exit")) {
while (!action.equalsIgnoreCase("5")) {
// get the input from the user
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");
Expand All @@ -40,11 +40,11 @@ public static void main(String[] args) {

public static void displayMenu() {
System.out.println("COMMAND MENU");
System.out.println("list - List all customers");
System.out.println("add - Add a customer");
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 +93,4 @@ public static void deleteCustomer() {
System.out.println("No customer matches that email.\n");
}
}
}
}
2 changes: 2 additions & 0 deletions Project/OSTask1/src/Student.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
name: Amira Mahmoud Ahmed Ali
section: 2
Binary file added Project/OSTask1/src/amiraMahmoud.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.