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







Related Discussions:- 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
Related Questions
Simple expressions A cornerstone of a programming language is the  ability  to compute expressions.  We will start here  with  arithmetic expressions, just to take the  concep

Python programs Every  general-purpose computer has a various detailed design, which  defines  that  the way  its program requires  to be specified is different. The "machine

Booleans   Before we talk about  conditionals, we require  to clarify the Boolean  data  type.  It has two values False and True. Typical statement that have Boolean values

Write a program that requests a password after the author/program information is displayed. Make the password "hello". The program should then ask the user for their name: if the n

#Why can''t I cd my Desktop? A minute ago I would open up cmd and it starts in C:\Users\myname but now it''s starting in C:\WINDOWS\system> and I don''t where I am or how to get ou

Write a program that will take price data for stocks and print it graphically to the screen. Your program should begin by asking the user for the file name. It should then create a

Expressions and assignment We can think of most computer programs as performing some sort of transformation on data.  Our code may get as input the exam scores of everyone in

Rewrite the area.py program (shown below, or in the Creating Functions section of the tutorial) so that it has separate functions for the perimeter and area of a square, a rectangl

what is python

In English, specify a representation of the board game in Python. The representation should capture the entire state of the game at one point in time. It may be helpful to first fi