Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Python Expert

Python Programming Assignment -

You first need an abstract base class, called, Account which has the following attributes and methods:

  • accountID: This attribute holds the ID assigned the account , if not provided set to zero.
  • balance: This attribute holds the initial balance of the account, if not provided set to zero.
  • numberDeposit: This attribute holds the number of deposits this month.
  • numberWithdrawals This attribute holds the number of withdrawals this month.
  • annuallnterest: This attribute holds the annual interest rate.
  • monthlyServiceCharges: This attribute holds the monthly service charges of the account.
  • init: An init method that sets the attributes of the class.
  • deposit: An abstract method that accepts an argument for the amount of the deposit. The method should add the argument to the account balance. It should also increment the variable holding the number of deposits.
  • withdraw: An abstract method that accepts an argument for the amount of withdrawal. This methods should subtract the argument from the balance. It should also increment the variable holding the number of withdrawals.
  • calclnterest: An abstract method that updates the balance by calculating the monthly interest earned by the account, and adding this interest to the balance. This is performed by the following formulas: Monthly Interest Rate = Annual Interest Rate / 12, Monthly Interest = Balance * Monthly Interest Rate and Balance = Balance + Monthly Interest.
  • monthlyProc: An abstract method that subtracts the monthly service charges from the balance, calls the calclnteret method, then sets the variables that hold the number of withdrawals, number of deposits, and monthly service charges to zero.
  • str: Through this method, account ID and balance are displayed.

Next, design a savings account class, called SavingsAccount, derived from the generic Account class. The SavingsAccount class should have the following additional members:

  • status: This attribute represent if account is active or inactive.

If the balance of the savings account falls below $3, it becomes inactive (the status member could be a flag variable). No more withdrawal would be made until the balance is raised above $30, at which time the account becomes active again. The savings account class should have the following methods:

  • init: An init method that inherits from the init method of Account class and also sets the status attribute of the class.
  • deposit: A method that checks if the account is inactive before a deposit is made. If the account is inactive the deposit brings the balance above $30, the account becomes active again. The deposit is then made by calling the base class version of the method.
  • withdraw: A method that checks to see if the account is inactive before a withdrawal is made. No withdrawal is made if the account is inactive. A withdrawals is then made by calling the base class version of the method.
  • monthlyProc: Before the base class method is called, this method checks the number of withdrawal. If the number of withdrawals for the month is more than 4, then a service charge of $2 for each withdrawals above 4 is added to the base class variable that holds the monthly service charges. Don't forget to check the account balance after the service charges are taken. If the balance falls below $30, the account becomes inactive.
  • str: This method prints the account ID, balance, and status.

Next, design a checking account class, also derived from the generic Account class. It should have the following member functions:

  • withdraw: Before the base class method is called, this method will determine if withdrawal will cause the balance falls below $0. If the balance goes below $0, a service charge of $20 will be taken from the account and no withdrawal would be made. If there is not enough to pay the account charges, the balance will become negative and the customer will owe the negative amount to the bank.
  • monthlyProc: Before the base class method is called, this function adds the monthly fee of $5 per withdrawals to the base class variable that holds the monthly service charges.

In the Main.py file, write a complete main function that demonstrates these classes by asking the user to enter the accounts of deposits and withdrawals for a savings and checking account. The program should display statistics for the month, including the beginning balance, total amount of deposits, total amount of withdrawals, service charges and ending balance.

NOTE: You may need t add more member variables and functions to the class than those listed above.

1) You need to create a class variable and assign an initial value of zero to it and update it throughout your program.

2) Yes, it should be decreased meaning that the account holder owes the bank.

3) You don't need to specify a timeline, all transactions assumed to be for the current month and you need to calculate that.

Python, Programming

  • Category:- Python
  • Reference No.:- M93111667
  • Price:- $40

Priced at Now at $40, Verified Solution

Have any Question?


Related Questions in Python

Foundations of programming assignment - feduni bankingthis

Foundations of Programming Assignment - FedUni Banking This assignment will test your skills in designing and programming applications to specification. Assignment Overview - You are tasked with creating an application t ...

Tasksdemonstrate data scraping of a social network of

Tasks Demonstrate data scraping of a social network of choice. Develop technical documentation, including the development of the code & detailing the results. Provide a report on the findings, that includes research into ...

Lab assignment -background - we have discussed in detail

Lab Assignment - Background - We have discussed, in detail, the function of Stacks and Queues and how they are specifically implemented in Python. To get a better understanding of the utility of these data structures, we ...

Question research pythons dictionary data type dictdiscuss

Question : Research Python's dictionary data type (dict). Discuss its interface and usage. Include examples. Discuss practical applications of dictionaries.

Question why is software configuration management

Question : Why is software configuration management considered an umbrella activity in software engineering? Please include examples and supporting discussion. The response must be typed, single spaced, must be in times ...

Simple python traffic lightswrite a program that simulates

Simple Python (Traffic lights) Write a program that simulates a traffic light. The program lets the user select one of three lights: red, yellow, or green. When a radio button is selected, the light is turned on, and onl ...

The second task in this assignment is to create a python

The second task in this assignment is to create a Python program called pancakes.py that will determine the final order of a stack of pancakes after a series of flips.(PYTHON 3) Problem Task In this problem, your input w ...

Environment setupthe first mini project will be based on

Environment Setup The first mini project will be based on Ladder Logic programming. We will be using Schneider Electric's IDE called SoMachine Basic to do the programming. The latest ver- sion of SoMachine Basic for Wind ...

Quesiton write a python script that counts occurrences of

Quesiton: Write a python script that counts occurrences of words in a file. • The script expects two command-line arguments: the name of an input file and a threshold (an integer). Here is an example of how to run the sc ...

Question a software company sells a package that retails

Question : A software company sells a package that retails for $99. Quantity discounts are given according to the following table: Quantity Discount 10 - 19 20% 20 - 49 30% 50 - 99 40% 100 or more 50% Write a program usi ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As