You are to create a simple bank account system based on the class below
Account
|
- accNumber: int
- balance: double
- first name:string
- last name:string
|
__init__ (accNumber,firstname,lastname,balance)
__str__()
deposit (amount:double):bool
withdraw(amount:double):bool
getAccountNumber():int
getBalance():double
getFirstName():string
getlastName():string
|
The above class represents a typical bank account object. You must first create a class that represents the above specification.
Create a user interface for the system as shown below.
Welcome to GBC Account System
Please select an option from the list below.
1. Add Account
2. Deposit
3. Withdraw
4. View Account
5. Exit
Add Account
should allow the user to Add a new Account to the system. It should ask for the following:
· Account number(an integer),
· The firstname on the account,
· The last name on the account
· The opening balance.
An account must then be created and
added to a list of accounts
Deposit
should ask the user for:
· An account number
· An amount to deposit
Once the amount to deposit is a positive number, should deposit it into the account.
Withdraw
should ask the user for:
· An account number
· An amount to withdraw
Note you should only withdraw if the balance on the account will be 0 or more after the transaction.
View Account
should ask the user for:
· An account number
It should display all the information about the account if it exists.
Exit
should clear the screen and give a departing message
·
Remember marks will be lost if
variable names are not appropriate