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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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