https://github.com/itsmenicky/bank-account
A python program that performs banking operations using OOP concepts
https://github.com/itsmenicky/bank-account
oops-in-python python
Last synced: 11 months ago
JSON representation
A python program that performs banking operations using OOP concepts
- Host: GitHub
- URL: https://github.com/itsmenicky/bank-account
- Owner: itsmenicky
- Created: 2024-04-11T22:51:08.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-18T23:17:25.000Z (about 2 years ago)
- Last Synced: 2025-03-18T14:47:19.365Z (about 1 year ago)
- Topics: oops-in-python, python
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Bank Account 💸
Considering that a bank agency has 5 customers and each customer has an account:
Customer
Balance
Marcos
$ 1.000,00
Julia
$ 250,00
João
$ 2.500,00
Roberto
$ 3.000,00
JanaÃna
$ 4.500,00
An algorithm was developed in Python to manage these accounts. As the algorithm needs to deal with different bank accounts, I used the BankAccount class to store the account holder's name, account balance and password.
Considering that a new tax was created that must be applied to banking operations, for each withdrawal made, 0.25% of the amount withdrawn must be deducted from the customer's remaining balance. The discounted amounts are accumulated in a private attribute __cpmf, which has been added to the BankAccount class.
The get_password and get_cpmf methods were also created in the BankAccount class.
Main Program
In the main program I created five instances of BankAccount and stored these objects in a list. I added an info function that receives the list of bank accounts and displays the data (account holder and balance) of all accounts on the screen. I also added the program's interactions with the user. For this, the withdraw_interaction, deposit_interaction and transfer_interaction functions were created; and implemented an options menu in the application.
A password authenticator was also implemented for greater security in the program's banking operations, through the password_authenticator function, which receives as parameters the account_index (index referring to the user's account that is carrying out the operation) and the password to be verified, verify.