Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Bank Account Class Design The design for a BankAccount object is laid out in the following class diagram: As you might imagine, the deposit_funds(amount) function

Bank Account Class Design The design for a BankAccount object is laid out in the following class diagram: As you might imagine, the deposit_funds(amount) function adds that money to the current balance of the account, and the withdraw_funds(amount) function removes (i.e. subtracts) money from the current balance of the account. Each transaction in the transaction_list is a tuple containing either the word Deposit or the word Withdrawal followed by an amount, for example: ("Deposit", 300.0) or ("Withdrawal", 100.0). The bank accounts in our program do not have an overdraft facility so the user cannot withdraw money they do not have that is, if they had $200 in their account and they tried to withdraw more than $200 then the operation should fail and the withdraw_funds function should raise an Exception with a suitable error message which is caught and displayed in the main.py file where the operation was attempted. All error messages such as those from exceptions should be displayed in a pop-up messagebox. The get_transaction_string method should loop over all the transactions in the transaction_list creating a string version (with newline characters) of all the transactions associated with the account. The save_to_file function should save the account_number, pin_number, balance, and interest_rate in that order to a file called .txt followed by the transaction list string generated from the get_transaction_string() method. The name of the account file is NOT '.txt' - the name of the file is the ACTUAL ACCOUNT NUMBER followed by ".txt", so for an account with account_number 123456 the name of the account file would be 123456.txt. A full walk-through video demonstrating the completed application and how it operates will be provided along with this assignment document.

the design for a bankaccount object is laid out in the following class diagram:

bank account

account_number : int

pin_number : string

balance: float

interest_rate:float

transaction_list:list of two-tuples

deposist_funds(amount)

withdraw_funds(amount)

get_transaaction_string()

save_to_file()

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Information Modeling And Relational Databases

Authors: Terry Halpin, Tony Morgan

2nd Edition

0123735688, 978-0123735683

More Books

Students also viewed these Databases questions

Question

Explain the market segmentation.

Answered: 1 week ago

Question

Mention the bases on which consumer market can be segmented.

Answered: 1 week ago

Question

3. Who would the members be?

Answered: 1 week ago