Savingsaccount objects and two checkingaccount objects

Assignment Help C/C++ Programming
Reference no: EM13810350

Develop a polymorphic banking application using the Account hierarchy you created. Create the following two SavingsAccount objects and two CheckingAccount objects and store them in an array called "arrays" of Account references to the objects:

Account Name                  Account Number             Initial Balance    Fee Charged      Interest Rate

[your name]-Savings-1                  1                              1,000                                                     4%

[your name]-Savings-2                  2                              2,000                                                     5%

[your name]-Checking-1                               3                              3,000                     3.00

[your name]-Checking -2              4                              4,000                     4.00

Using a "foreach" loop, iterate over each account in the array.  For each Accountin the array, first print the account.  Next, allow the user to specify an amount of money to withdraw from the Account using method Debit and an amount of money to deposit into the Account using method Credit.  Specifically, for each account, prompt the user to enter an amount to deposit in the account and call the Credit method.  Print the object.  Next, prompt the user to enter an amount to withdraw and call the Debit method. Print the object.  After the user has made a deposit and a withdrawal from an account, calculate interest if the account is a SavingsAccount and print the object.  To perform this step, you must first determine the object's type.  If the Account is a SavingsAccount, calculate the amount of interest owed to the Account using method CalculateInterest and print the account a final time.  If the account is a CheckingAccount, you do not need to CalculateInterest nor print the account a final time.

Reference no: EM13810350

Questions Cloud

Database modeling : After reading this week's article, "Modeling for the Future," expand on the subject of Database Modeling. There are several tools listed and reviewed in the article. Research these tools further, or identify other modeling tools
Entered into a futures contract and bought a call option : You need a barrel of oil next month. You could either buy the oil today and keep it for a month, wait and buy the oil next month when you need it, you could enter into a futures contract to buy oil at the current futures price $81, or you can pay $2 ..
Problem regarding the cause-and-effect diagram : The cause-and-effect diagram is important in determining causes and effects of a problem. The cause-and-effect diagram is also known as the Ishikawa diagram, or the fishbone diagram. Creating the diagram requires knowledge of causes for a problem ..
Forward contracts are standardized and trade on an exchange : Forward contracts are standardized and trade on an exchange. Profits and Losses on Futures contracts are marked to market on a daily basis. Delivery of the assets almost never occurs in the forward market.
Savingsaccount objects and two checkingaccount objects : Develop a polymorphic banking application using the Account hierarchy you created. Create the following two SavingsAccount objects and two CheckingAccount objects and store them in an array called "arrays" of Account references to the objects
Sport and society : sport and society
Situation facing mensa at the time of the case : Describe the situation facing Mensa at the time of the case. This should include the major issues facing the company and the decisions that need to be made.
Statement regarding executive stock-lower risk free rates : Lower risk free rates results in __________ Put Option prices and ______ Call Option Prices. Which statement regarding executive stock options is correct?
Best strategic planning and implementation : Explain the BEST strategic planning and implementation/execution you have observed. Discuss fully. (2) Explain the WORST strategic planning and implementation/execution you have observed. What would you have done differently? Be specific. NOTE: Do..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a program using the class as defined

Write a program using` the class as defined below. Put the class definition in a separate header file, and put all the functions' code in a separate Resource file.

  State a program that reads an integer from the keyboard

Write a program that reads an integer from the keyboard, and prints the integer to the screen. You must write a function to do this task. After the integer is printed, you must call a function (that you write) which asks the user to enter a ‘Y' or..

  Write a program to determine how long (sec.)

Using the v 2  form of drag, write a program to determine how long (sec.) and how far (m) a 150 gram ball whose radius is 3.5cm would fall before it reached 75% of its terminal velocity. Assume ball falls in air whose density is 1.21 kg/m 3 , has a d..

  Cpp program display overtime or regular time pay calculation

Display overtime or regular time pay calculations. See the sample output. Implement object calculations by summarizing your employee objects and display the summary information in the example.

  Write a recursive function squares

Write a recursive function squares that takes a list of numbers, and returns a new list of the squares of those numbers.

  We would like to use linear interpolation

Assume that we would like to use linear interpolation to determine the coefficient of lift for additional flight-path angles that are between -4 degrees and 21 degress. write a program that allows the user to enter the data for two points and a.

  Develop data structures - chord system

Develop data structures which are suitable to hold required information for each peer in a CHORD system. Note that index nodes can hold local information only

  Determining the volume of the unit sphere

Write a C program for determining the volume of the unit sphere by the Monte Carlo Method      \(x^{2}+ y^{2} + z^{2} 0, y > 0, z > 0.\)    : This is what I have so far, but it's not working.

  Only letters are affected

You are to write a ROT13 (for "rotate 13") decoder to translate a secret message from its encoded state to something readable. In a ROT13 code, 'a' is shifted 13 letters to 'n', 'B' to 'O', 'c' to 'p', 'D' to 'Q', ..., 'N' to 'A', 'o' to 'b', 'P' ..

  C program to mips program

Convert the following C program to MIPS program. Assuming that i, j, k, f, are stored in registers $s0, $s1, $s2, $s3 already.

  Create a program that draws a two-dimensional house

Create a program that draws a two-dimensional house seen from the front, the way a child would see it: with a door, two windows, and a roof with a chimney

  Program to declare array alpha of components of type int

Write C++ statements to do the following: Declare an array alpha of 15 components of the type int. Output the value of the tenth component of the array alpha.

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