An open API service indexing awesome lists of open source software.

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

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.