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

Part i the assignment filesone of the most important

Part I: The Assignment Files One of the most important outcomes of this assignment is that you understand the importance of testing. This assignment will follow an iterative development cycle. That means you will write a ...

Homework -this homework will have both a short written and

Homework - This homework will have, both a short written and coding assignment. The problems that are supposed to be written are clearly marked. 1) (Written) Make heuristics Describe two heuristics for the slide problem ...

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 ...

Assignment1 utilising python 3 build the following

Assignment 1. Utilising Python 3 Build the following regression models: - Decision Tree - Gradient Boosted Tree - Linear regression 2. Select a dataset (other than the example dataset given in section 3) and apply the De ...

Python programming assignment -you first need an abstract

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 ...

Learning outcomes lo3 - research develop and document a

Learning Outcomes LO3 - Research, develop, and document a basic security policy, and analyse, record, and resolve all security incidents LO4 - Identify and assess the threats to, and vulnerabilities of networks Assessmen ...

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.

Questionwhat is a python development frameworkgive 3

Question What is a python development framework? Give 3 examples python development framework used today. and explain which development framework is used in which industry.

Below zero - ice cream storethe local ice-cream store needs

Below Zero - ice cream store The local ice-cream store needs a new ordering system to improve customer service by streamlining the ordering process. The manager of the store has found that many orders are incorrect and s ...

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 ...

  • 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