Customer Service Chat
Get quote & make Payment
assignment 10, Python Programming
#question.Program 10 Assignment
(Banking Objects – Savings/Checking Accounts)
Create a program named 10.py that performs the following:
Create a class named ChkAcct, and a class named SavAcct. Each class should have a “balance” property. Each class should also have a deposit method to add to the balance, and a withdraw method to subtract from the balance. Each class should also have a transfer method that calls the withdraw method in its own class, and invoke (call) the deposit method in the other class.
1. When you “open” an account by creating an instance of a class (an object), ask the user to input a beginning balance.
2. Have the user open a savings account and a checking account by entering a beginning balance for each account. Print the balance of each account.
3. Ask the user for an amount to deposit into the savings account, then add it to the balance for the savings account. Print the balance.
4. Ask the user for an amount to deposit into the checking account then add it to the balance for the checking account. Print the balance.
5. Ask the user for an amount to withdraw from the savings account then subtract that amount from the balance for the savings account. Print the balance.
6. Ask the user for an amount to withdraw from the checking account then subtract that amount from the balance for the checking account. Print the balance.
7. Ask the user to input the dollar amount to transfer from the checking account to the savings account. Print the balance of both the checking and savings accounts when the transaction is complete.
8. Ask the user to input the dollar amount to transfer from the savings account to the checking account. Print the balance of both the checking and savings accounts when the transaction is complete.
Posted Date: 12/22/2012 5:17:41 PM | Location : United States
Ask an Expert
assignment 10, Assignment Help, Ask Question on assignment 10, Get Answer, Expert's Help, assignment 10 Discussions
Write discussion on assignment 10
Your posts are moderated
Write your message here..
Non-local references, Non-local references So far, whenever we needed ...
Non-local references So far, whenever we needed to compute a variable, there was a binding for that variable in the 'local' environment (the environment in which we were e
program that receives as input from the user, Write an algorithm for a pro...
Write an algorithm for a program that receives, as input from the user, 2 string variables and 2 integer variables; then joins together and displays the combined strings; and final
Stuck on homework, There are three seating categories at a stadium. For a s...
There are three seating categories at a stadium. For a softball game, Class A seats cost $15, Class B seats cost $12, and Class C seats cost $9. Write a program that asks how many
Variables, Variables We cannot go very far without variables. A variabl...
Variables We cannot go very far without variables. A variable is a value related to a name that we can bind to have a particular value and then later use in an expression.
Otway rees protocol implementation, I need server, client and trusted side ...
I need server, client and trusted side communicating and charging a service with that protocol (or needham shroeder)
Range, Range Very frequently, we will want to iterate through a list o...
Range Very frequently, we will want to iterate through a list of integer values, often as indices. Python gives a useful function, range, which gives lists of integers. It ma
Top-down approach, what are the issues assciated with top-down analysis
what are the issues assciated with top-down analysis
Modules, Modules As you start to write larger programs, you will want ...
Modules As you start to write larger programs, you will want to save the function de?nitions in multiple ?les, collected together according to what they do. So, for exampl
Example of python code, Worked example 1 Let's examine what happens...
Worked example 1 Let's examine what happens when we compute the following Python code: def p(x, y): z = x*x - y return z + 1/z >>> p(1.0, 2.0) -2.0
Non-local references in procedures, Non-local references in procedures ...
Non-local references in procedures There is an important subtlety in the way names are handled in the environment created by a function call. When a value that is not
Accounting Assignment Help
Economics Assignment Help
Finance Assignment Help
Statistics Assignment Help
Physics Assignment Help
Chemistry Assignment Help
Math Assignment Help
Biology Assignment Help
English Assignment Help
Management Assignment Help
Engineering Assignment Help
Programming Assignment Help
Computer Science Assignment Help
Why Us ?
~24x7 hrs Support
~Quality of Work
~Time on Delivery
~Privacy of Work
Human Resource Management
Literature Review Writing Help
Terms & Conditions
Copyright by ExpertsMind IT Educational Pvt. Ltd.