Write a Class Diagram and Pseudocode for
Windows application that functions like a banking account register. Separate the business logic form the presentation layer. The graphical user interface (GUI) should allow the user to input the account name, number and balance. Ensure that the full name is entered for the customer and that only numeric values are entered for the number fields when the Create Account Button is selected. Separate the business logic from the presentation layer by creating a Customer class. Include a deposit to and withdraw from methods in the customer class to keep the balance updated. After the object of the customer class is instantiated, provide Textbox objects on your GUI for the withdrawals and deposits. A second button object should be available to update the account for withdrawal and deposit transactions showing the new balance.
Pseudocode
Start
Declare variable accountName
Declare variable balance
Declare variable number
Declare variable newBankAccount
Declare variable amount
if button "Create Account" is clicked then
Read accountName from textbox
Read balance from textbox
Read number from textbox
Create a new BankAccount object
Display message: "Account has been created."
end if
if button "Update Account" is clicked then
Read amount from textbox
if radiobutton "Deposit" is selected then
deposit amount to newBankAccount
else
withdraw amount from newBankAccount
end if
Display BankAccount balance
end if
Stop
Class Diagram
Comments
Leave a comment