Exercise 2: Creating The Bank GUI Part 2 (Advanced)

In this exercise, you will create a GUI for the Bank project.

Note - This is an avanced exercise. It is optional and should only be attempted if you have already completted the previous exercise for this module.
 

The simulated ATM must behave in this manner:

  1.  The ATM screen is displayed.

At this stage, the Action buttons must be disabled and the following text must be displayed in the Output text area: Enter your customer ID into the key pad and press the ENTER button.

   2.   The user enters the ID using the key pad buttons. Each number is displayed in the Data Entry text field.

When the ENTER button is selected, the application retrieves the speciefied customer object and displays the following text in the Output text area: Welcome FIRST-NAME LAST-NAME if the customer was found; otherwise, the following text is displayed: Customer ID was not found. Finally, if the customer was found, then the Action button are enable.

  3.   The user selects one of the Action buttons.

if the action is either deposit or withdraw, then the user is prompted to enter the amount. The user can the enter the amount by clicking the key pad buttons which (again) places digits in the Data Entry text field. When the ENTER button is selected, the program executes the action with the amount entered in the Data Entry text field. Finally, the result of the operation must be displayed in the Output text area. At the end of the operation, the GUI should begin again at the top of the ATM operation cycle.

 

Here is an example ATM transaction for Owen Bryant :

Enter your customer ID into the key pad and press the ENTER button.
 
Welcome Owen Bryant
 
Your account balance is: 200.0
Enter the mount to deposit into the key pad and press the ENTER button.
Your deposit of 100.0 was successful.
Your account balance is: 300.0
Enter the amount to withdraw into the key pad end press the ENTER button.
Your withdraw of 250.0 was successful.
Your account balance is: 50.0