Skip to content

Commit

Permalink
Fixed delete client method in client
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosv5 committed Dec 2, 2017
1 parent 296e779 commit e95c61c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions BankClient/src/es/upm/dit/cnvr/client/ClientApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static void showOptions(){
System.out.println("| - Usage: UPDATE [Account ID] [New Balance] |");
System.out.println("|4. Delete a client account |");
//ClientName for security purposes
System.out.println("| - Usage: DELETE [Account ID] [ClientName] |");
System.out.println("| - Usage: DELETE [Account ID] [Name and lastnames]|");
System.out.println("|5. Show these options again |");
System.out.println("| - Usage: OPTIONS |");
System.out.println("|----------------------------------------------------|");
Expand Down Expand Up @@ -93,14 +93,14 @@ public static void showOptions(){
break;
case "DELETE":
//Check options
if(input_parts[1] == null || input_parts[2] == null || input_parts.length > 3){
if(input_parts[1] == null || input_parts[2] == null || input_parts[3] == null|| input_parts[4] == null|| input_parts.length > 5){
System.out.println("¡¡¡¡You are not using this operation properly!!!!\n\n");
break;
}
//Variables for method
op = OperationEnum.DELETE_CLIENT;
accountId = input_parts[1];
clientName = input_parts[2];
clientName = input_parts[2]+" "+input_parts[3]+" "+input_parts[4];
//Send
result = operateAndSend(op,accountId,clientName,balance);
break;
Expand Down

0 comments on commit e95c61c

Please sign in to comment.