In this video, we will write a python program to create Bankaccount class with a deposit, and withdraw function using the OOPS concept.
If you are into programming then you must have heard about OOP, which is object-oriented programming. This is exactly what we will be looking at in this video. We will learn how we can implement a simple Bank Account class which contains functions like deposit and withdrawal.
Class is like a skeleton of an object by using which we can create multiple instances or objects. With each instance of an object, a completely independent set of variables are initialized which can be used to perform the desired operation but the structure of each of the classes remains the same.
There is a keyword that is a self-keyword. By using the “self” we can access the attributes and methods of the class in python. Like by using self.balance we are calling the balance variable which is associated with that particular instance of the bank account class.
What are methods in a class?
Methods are some utility functions that we define to perform multiple operations with the variables of a class. Like in the bank account class, we have created a deposit function and a withdraw function which can help us to change the value of the variable.
This is a very simple application of OOP but even in systems of real-life banking management software, these concepts are used to develop safe and secure systems.
Python program to create Bankaccount class with deposit, withdraw function using OOPS concept: https://www.geeksforgeeks.org/python-program-to-create-bankaccount-class-with-deposit-withdraw-function/