Develop a banking application using the account hierarchy

Assignment Help Computer Engineering
Reference no: EM131887540

PROGRAMMING ASSIGNMENT

INSTRUCTIONS

Adapted from: Deitel & Deitel (2017). Visual C# 2015 How to Program (6th ed.). Pearson Education, Inc.

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.

Hint: To determine if an account is a savings or checking account, use the .getType method which returns a string representing the Name or FullName property. Then use the ".Equals" method to determine if the returned string is equal to the name of the class. For example, acct.getType().Name returns the string "SavingsAccount" or "CheckingAccount". Once you have determined that an account is a SavingsAccount object, you must "cast" the account object into a SavingsAccount object in order to access its CalculateInterest method. I like to perform this in two steps: declare a differentvariable to hold the reference to the object that has been cast from an Account object into a SavingsAccount object. Then, using this new variable, invoke its CalculateInterest method.

Attachment:- Programming-Assignment-Instructions.rar

Reference no: EM131887540

Questions Cloud

Child ability to understand others : Could excessive screen time hurt a child's ability to understand others' emotional cues?
Implement the connect four game : Connect Four is an absorbing and challenging game of vertical strategy that's easy to learn and fun to play. Implement the connect 4 game
What are the challenges associated with apple decision : Please read the WSJ article posted and respond to the following questions.This assignment does not have a minimum word requirement.
Show the eventual conditioned behavior : Who was Ivan Pavlov and how did he "discover" what is now known as Classical Conditioning? As part of this answer, be sure to fully detail
Develop a banking application using the account hierarchy : Develop a polymorphic banking application using the Account hierarchy you created. Using a foreach loop, iterate over each account in the array.
Relationship between alcohol consumption and academic : Post a short scenario that represents a correlational study that seeks to investigate the relationship between alcohol consumption and academic performance.
How new your career is to the market : How much this career pays, on average, in your location. How "new" your career is to the market.
What are the two most convincing pieces of evidence : What are the two most convincing pieces of evidence that both genetic and environmental factors play significant roles in the development of obesity?"
Describe the response to make waves : Describe the likely response that these two competitors will take once you begin to make waves, assuming that you are entering a market in which competition.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Prepare an html document that describes an ordered list

Prepare and test an HTML document that describes an ordered list with the following contents: The highest level should be the names of your parents.

  Explain why is a flowchart useful in developing and

q1. why is a flowchart useful in developing and documenting software? why is the interactive visual logic flowchart

  Make a letter applying for the job and write a resume

Your letter has to address the details in the ad. So, if the ad says the successful candidate will need to speak Spanish, you should say whether or not you can speak Spanish in the letter.

  How can you extract from the output of find name

How can you extract from the output of find . -name "*.c" -print only the filenames in the current directory and not in its subdirectories?

  What is the system bus and what are its main components

What is the system bus? What are its main components? What is a bus master? What is the advantage of having devices other than the CPU be bus masters?

  What do you mean by "file type"

What is "File Type" and what are some of the important information to know about it.

  Write an algorithm to decide which commute is cheaper

You want to decide whether you should drive your car to work or take the train. Write an algorithm to decide which commute is cheaper.

  Suppose further that this isp is deliberately dropping 25

suppose an internet service provider isp has a voice over ip voip telephone system that is manages and sells. suppose

  What does it mean to overload a function

When a function accepts multiple arguments, does it matter what order the arguments are passed in? Explain your answer.

  Translate following c++ program to pep/8 assembly language

Translate following C++ program to Pep/8 assembly language

  Determine the centroids of the quantization regions

[Determining the Centroids] Determine the centroids of the quantization regions for a zero-mean, unit-variance Gaussian distribution.

  Examine your thoughts on the effects of indexes

Discuss the thoughts on the effects of indexes, data types, filegroups, and transaction logs on space considerations. Which of those database constructs do you feel are most important to manage when it comes to database size considerations.

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