PWP Final Microproject
PWP Final Microproject
Semester: SIXTH(6TH)
115.Sanskruti Kakade
133.Monika More
135.Aditi More
Maharashtra State
Board of Technical Education, Mumbai
(Autonomous) (ISO-9001-2015) (ISO/IEC 27001:2013)
CERTIFICATE
Date:
Seal of institute
1. Topic given by
subject teacher and 15/07/24 15/07/24 Samiksha Gaikwad
discussed with given
members.
5. Collection of
information related to
the topic. 12/08/24 12/08/24 Monika More
6. Analyzed the
collected data and
finalize structure of 28/08/24 28/08/24 Sanskruti Kakade
the project.
7. Report preparation.
02/09/24 02/09/24 Samiksha Gaikwad
class BankAccount:
def __init__(self, account_number, name, initial_balance=0):
self.account_number = account_number
self.name = name
self.balance = initial_balance
def check_balance(self):
return f"Account Balance: {self.balance}"
class ATMApp:
def __init__(self, root):
self.root = root
self.root.title("ATM
SYSTEM")
self.root.geometry("450x600")
self.root.configure(bg="#000")
self.accounts = {}
self.create_widgets()
def create_widgets(self):
title_label =
tk.Label(self.root, text="ATM
SYSTEM", fg="white",
bg="black", font=("Arial", 20,
"bold"))
title_label.pack(pady=20)
input_frame =
tk.Frame(self.root, bg="black")
input_frame.pack(pady=10)
tk.Label(input_frame,
text="Account No:",
fg="white", bg="black",
font=("Arial", 12)).grid(row=0,
column=0, sticky="w")
self.acc_entry =
tk.Entry(input_frame,
font=("Arial", 14), width=20)
self.acc_entry.grid(row=0,
column=1, pady=5)
tk.Label(input_frame,
text="Name:", fg="white",
bg="black", font=("Arial",
12)).grid(row=1, column=0,
sticky="w")
self.name_entry =
tk.Entry(input_frame,
font=("Arial", 14), width=20)
self.name_entry.grid(row=1,
column=1, pady=5)
tk.Label(input_frame,
text="Amount:", fg="white",
bg="black", font=("Arial",
12)).grid(row=2, column=0,
sticky="w")
self.amount_entry =
tk.Entry(input_frame,
font=("Arial", 14), width=20)
Department of Computer Engineering, PC Polytechnic
\
self.amount_entry.grid(row=2,
column=1, pady=5)
btn_frame =
tk.Frame(self.root, bg="black")
btn_frame.pack(pady=20)
btn_style = {"font":
("Arial", 14, "bold"), "bg":
"#444", "fg": "white", "width":
20, "height": 2}
self.create_btn =
tk.Button(btn_frame,
text="Create Account",
command=self.create_account,
**btn_style)
self.create_btn.grid(row=0,
column=0, pady=10, padx=10)
self.deposit_btn =
tk.Button(btn_frame,
text="Deposit",
command=self.deposit_money,
**btn_style)
self.deposit_btn.grid(row=1,
column=0, pady=10, padx=10)
self.withdraw_btn =
tk.Button(btn_frame,
text="Withdraw",
command=self.withdraw_mone
y, **btn_style)
self.withdraw_btn.grid(row=2,
column=0, pady=10, padx=10)
self.balance_btn =
tk.Button(btn_frame,
text="Check Balance",
command=self.check_balance,
**btn_style)
self.balance_btn.grid(row=3,
column=0, pady=10, padx=10)
def create_account(self):
acc_number =
self.acc_entry.get()
name =
self.name_entry.get()
if not acc_number or not
name:
messagebox.showerror("Error",
"Account Number and Name
are required!")
return
if acc_number in
self.accounts:
messagebox.showerror("Error",
"Account already exists!")
return
self.accounts[acc_number]
= BankAccount(acc_number,
name, 0)
messagebox.showinfo("Success
", "Account created
successfully!")
def deposit_money(self):
acc_number =
self.acc_entry.get()
amount =
self.amount_entry.get()
if acc_number in
self.accounts:
try:
amount =
float(amount)
result =
self.accounts[acc_number].depo
sit(amount)
messagebox.showinfo("Deposit
", result)
except ValueError:
messagebox.showerror("Error",
"Invalid amount!")
else:
messagebox.showerror("Error",
"Account not found!")
def withdraw_money(self):
acc_number = self.acc_entry.get()
amount = self.amount_entry.get()
if acc_number in self.accounts:
try:
amount = float(amount)
result = self.accounts[acc_number].withdraw(amount)
messagebox.showinfo("Withdraw", result)
except ValueError:
messagebox.showerror("Error", "Invalid amount!")
else:
messagebox.showerror("Error", "Account not found!")
def check_balance(self):
acc_number = self.acc_entry.get()
if acc_number in self.accounts:
result = self.accounts[acc_number].check_balance()
messagebox.showinfo("Balance", result)
else:
messagebox.showerror("Error", "Account not found!")
if __name__ == "__main__":
root = tk.Tk()
app = ATMApp(root)
root.mainloop()
7.0 OUTPUT
Topic given by
subject teacher Samiksha Gaikwad
1. 23/09/24 23/09/24
and discussed on
given members.
Collection of
information Monika More
2. 23/09/24 23/09/24
related
to the topic.
Planning of
3. 30/09/24 30/09/24 Aditi More
project.
Analyze the
collected data and
4. finalize structure 30/09/24 30/09/24 Sanskruti Kakade
of
data
Submission of
5. 14/10/24 14/10/24 Samiksha Gaikwad
proposal
Distribution of
task and
discussion of role 14/10/24 14/10/24
6. Sanskruti Kakade
and
responsibilities of
each other.