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

  Conditional statementsquestion 1 write a program that

conditional statementsquestion 1 write a program that computes the cost of a long distance call. the cost of the call

  Make an explicit statement of the invariant of the set class

Prepare a new container class called ser, which is similar to a bag, except that a set can contain only one copy of any given item, you'll need to change the interface a bit.

  Why is exception handling important to software development

Please respond to all of the following prompts: Why is exception handling important to software development? Can there be such a thing as too much exception handling? How does exception handling affect performance of code execution?

  Implement a program to add three numbers

implement a program to add three numbers - I can get the two numbers but not 3.  Need to be able use in PEP 8 loader and executor.  All I need is the object

  A parking garage charges a $2.00 minimum

A parking garage charges a $2.00 minimum fee to park for up to three hours and an additional $0.50 per hour for each hour or part thereof over three hours.

  Write a value-returning function

Write a program that uses the function isNumPalindrome given(Palindrome Number). Test your program on the following numbers: 10, 34, 22, 333, 678, 67876, 44444, and 123454321.

  Integer arguments representing feet

A constructor that will take a single integer argument representing a whole number of feet • A constructor that will take two integer arguments representing feet and inches respectively • A constructor that will take three integer arguments represent..

  Write a program that asks the user for a profile name

Write a program that asks the user for a profile name and displays the number of characters, words, and lines in that file. Then have the program ask for the name of the next file. When the user enters a file that doesn't exist (such as the empty ..

  A linked list of your song structure in cd

The CD object should have a data member that is a linked list of your song structure that you have in CD.  The CD class needs a function that allows it to add a song to the object, that function would then append the song to that instance of the link..

  Write a program that displays a weekly payroll report

Write a program that displays a weekly payroll report

  Task 1 for your first task you will prepare sorted

task 1 for your first task you will prepare sorted versions of the linked lists and vector data structures developed

  Assume we have an array named $students

Assume we have an array named $students. Each entry in the array contains a student's full name (e.g. "Jane Smith"). Write the PHP code needed to display all students (in the array) whose first name starts with the letter "J".

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