assignment 10, Python Programming

Assignment Help:
#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.



Related Discussions:- assignment 10

Programs and data , Programs and Data Object-oriented programming is a...

Programs and Data Object-oriented programming is a popular way  of managing programs, which  groups together data  with  the procedures that  works on them,  thus  facilitatin

Internal models, Internal models As we want to create  more and more c...

Internal models As we want to create  more and more complex  machine with  software programs as controllers, we search  that  it is often needful  to create  additional types

Simple expressions, Simple expressions A cornerstone of a programming ...

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

If statements, how do you make an if and else statment work in pytho?

how do you make an if and else statment work in pytho?

Problem, an array A[0..n-1] of nr red elements, nw white elements and nb bl...

an array A[0..n-1] of nr red elements, nw white elements and nb blue elements in random order such that 0 = nr,nw,nb = n and nr + nw + nb = n, and arranging them such that all reds

Algorithms, Write an algorithm for the sum of the given series 1,-1/2,1/4,-...

Write an algorithm for the sum of the given series 1,-1/2,1/4,-1/8.....

Help, When investing money, an important concept to know is compound intere...

When investing money, an important concept to know is compound interest. The equation FV = PV (1+rate)periods . This relates the following four quantities. The present value (

Lab programming, protocol rdt2.2 considers there is a bit errors between se...

protocol rdt2.2 considers there is a bit errors between sender to receiver and also from receiver to sender. So now we have to consider checking bit errors introduced in reply from

Three layer neural network to classify the two sets of 3-D d, 1. Use a thre...

1. Use a three layer neural network to classify the two sets of 3-D data set. You should generate 100 samples for each data set based on the following criteria: Data set 1: generat

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd