0% found this document useful (0 votes)
10 views3 pages

Python m2 Ieee

This document presents a project on creating a banking system using Python and object-oriented programming concepts. It outlines the design of a flexible system that manages different types of bank accounts, including savings and checking accounts, with specific functionalities like deposits, withdrawals, and interest calculations. The project emphasizes the importance of code organization and reusability through inheritance and method overriding.

Uploaded by

prorider2937
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views3 pages

Python m2 Ieee

This document presents a project on creating a banking system using Python and object-oriented programming concepts. It outlines the design of a flexible system that manages different types of bank accounts, including savings and checking accounts, with specific functionalities like deposits, withdrawals, and interest calculations. The project emphasizes the importance of code organization and reusability through inheritance and method overriding.

Uploaded by

prorider2937
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

* ( PYTHON IEEE DOCUMENT)

P.Naga Sravanthi P.Adhitya Hareesha


(241FA07017) (241FA07031) N.Purandar Anish
Department of IT Department of IT (241FA070053)
Vignan’s foundation for Vignan’s foundation for Department of IT
science,technology and science,technology and Vignan’s foundation for
research(deemed to be university) research(deemed to be university) science,technology and
vadlamudi,india vadlamudi,india research(deemed to be university)
Gmail:123456@gmail.com Gmail:123456@gmail.com vadlamudi,india
Gmail:123456@gmail.com
V.Nikhil Ram
(241FA07063)
Department of IT
Vignan’s foundation for
science,technology and
research(deemed to be university)
vadlamudi,india
Gmail:123456@gmail.com

Abstract— This IEEE explores problem-solving using Python, focusing on financial planning and fundamental programming
concepts such as loops and user input handling This project is about creating a simple banking system using object-oriented
programming in Python. It focuses on building a system that can handle different types of bank accounts-like savings and checking
accounts-while keeping common features like deposits and withdrawals. The goal is to design a flexible and reusable system using
classes and inheritance.

Introduction :

In the world of banking, people use different kinds of accounts for different needs. A savings account usually has restrictions
on how often money can be withdrawn, while a checking account is more flexible but may have lower or no interest. To build
a banking application, we need to manage all these types of accounts and their unique rules. In this project, we use object-
oriented programming concepts like classes, inheritance, and method overriding to create a structure that handles both
savings and checking accounts. We start with a general class called Bank Account, and then create two special types-Savings
Account and Checking Account. This design helps keep the code simple, organized, and easy to update. The second part
delves into Python loops, exploring their significance in iterative processes through various examples.

PART -A

8. Design a Bank Account System with Multiple Account Types


Scenario:

You are developing a banking application. The system needs to support multiple types of bank accounts, such as savings and
checking accounts. Both account types share common functionalities like deposit and withdrawal, but they may have different
rules or restrictions for withdrawals.

Question:
Design an object-oriented system to model the bank accounts.
Create a parent class BankAccount that includes attributes like account holder's name, balance. and account number, as well
as methods like deposit() and withdraw ().
Create subclasses Savings Account and CheckingAccount that inherit from BankAccount. The Savings Account should have
a restriction on the number of withdrawals per month, while the Checking Account should have a lower interest rate.
Override the withdraw() method in the subclasses to implement specific withdrawal rules.
Implement a method get_balance() to return the account balance and display it.
Provide a method to calculate interest in Savings Account.

XXX-X-XXXX-XXXX-X/XX/$XX.00 ©20XX IEEE


Answer:
class BankAccount:
def __init__(self, name, balance, account_number):
self.name = name
self.balance = balance
self.account_number = account_number
def deposit(self, amount):
self.balance += amount
print(f"{amount} deposited. New balance: {self.balance}")
def withdraw(self, amount):
if amount <= self.balance:
self.balance -= amount
print(f"{amount} withdrawn. New balance: {self.balance}")
else:
print("Insufficient balance!")
def get_balance(self):
return self.balance
class SavingsAccount(BankAccount):
def __init__(self, name, balance, account_number, interest_rate):
super().__init__(name, balance, account_number)
self.interest_rate = interest_rate
self.withdrawals_this_month = 0
self.withdrawal_limit = 3
def withdraw(self, amount):
if self.withdrawals_this_month < self.withdrawal_limit:
super().withdraw(amount)
self.withdrawals_this_month += 1
else:
print("Monthly withdrawal limit reached!")
def calculate_interest(self):
interest = self.balance * self.interest_rate / 100
print(f"Interest: {interest}")
return interest
class CheckingAccount(BankAccount):
def __init__(self, name, balance, account_number, fee):
super().__init__(name, balance, account_number)
self.fee = fee
def withdraw(self, amount):
total = amount + self.fee
if total <= self.balance:
self.balance -= total
print(f"{amount} withdrawn with {self.fee} fee. New balance: {self.balance}")
else:
print("Insufficient balance (including fee)!

Output screen short:

Conclusion:
In large Python projects, it is essential to use import statements thoughtfully to maintain code clarity, avoid naming conflicts,
and ensure maintainability .By designing this bank account system using object-oriented programming, we made it easier to
manage different account types and their behaviors. We reused common code in the parent class and customized features in
child classes. This project helped show how inheritance and method overriding can simplify complex problems. It also
prepares the system to be expanded later, like adding more account types or features, without changing the whole program.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy