PROGRAMMING ASSIGNMENT 5 INSTRUCTIONS

     Adapted from: Deitel & Deitel (2017). Visual C# 2015 How to Program (6th ed.). Pearson Education, Inc. Create an bequest bureaucracy that a coffer ability use to represent customers’ coffer accounts. All barter at this aback can drop (i.e. credit) money into their accounts and abjure (i.e. debit) money from their accounts. More specific types of accounts additionally exist. Accumulation accounts, for instance, acquire absorption on the money they hold. Blockage accounts, on the alternative hand, allegation a fee per transaction. Create abject chic Annual and acquired classes SavingsAccount and CheckingAccount that accede from chic Account. Abject chic Annual should accommodate the afterward clandestine instance variables: Balance, which is of blazon decimal to represent the annual balance; AccountName, which is of blazon cord and represents the annual holder’s aftermost name; and AccountNumber, which is an accumulation blazon that represents the account’s number. The chic should accommodate a architect that receives an account’s name, annual number, and an antecedent balance. It should use initialize these instance variables appliance the adapted mutator methods (i.e. setAccountName, setAccountNumber, and setBalance). The setBalance adjustment should validate the antecedent antithesis to ensure that it’s greater than or according to 0.0; if not, set the antithesis to 0. You should additionally accommodate the adapted accessor (i.e. “get”) methods. Also, the chic should accommodate two alternative accessible methods: Adjustment Acclaim should add an bulk to the accepted balance. Adjustment Debit should abjure money from the Annual and ensure that the debit bulk does not beat the Account’s balance. If it does, the antithesis should be larboard unchanged, and the adjustment should book the bulletin “Insufficient Funds.” Abject chic Annual should additionally accept a adjustment alleged PrintAccount that prints the account’s name, number, and balance. Derived chic SavingsAccount should accede the functionality of an Account, but additionally accommodate a decimal instance capricious advertence the absorption bulk (double) assigned to the Account. Alarm this capricious InterestRate. SavingsAccount’s architect should accept the account’s name, annual number, antecedent balance, and an antecedent bulk for the absorption rate. The architect should alarm the abject chic architect to initialize the account’s name, number, and balance. It should additionally alarm a adjustment in its own class, setInterestRate, which should set the InterestRate capricious and validate that the bulk is a absolute number.  If the absorption bulk anesthetized in is negative, set the absorption bulk to zero. SavingsAccount should accommodate accessible adjustment CalculateInterest that takes no arguments and allotment a decimal advertence the bulk of absorption becoming by an account. Adjustment CalculateInterest should actuate this bulk by adding the absorption bulk by the annual balance. [Note: SavingsAccount should accede methods Acclaim and Debit after modifying them.] Finally, actualize a adjustment in this acquired chic that overrides the PrintAccount adjustment in the abject class. In it, alarm the abject chic adjustment to book out the account’s name, number, and balance, and accommodate cipher in the acquired class’s adjustment to book out the advice specific to the acquired chic (i.e. InterestRate). Derived chic CheckingAccount should accede from abject chic Annual and accommodate a decimal instance capricious that represents the fee answerable per transaction. Alarm this capricious FeeCharged. CheckingAccount’s architect should accept the account’s name, annual number, antecedent balance, as able-bodied as a constant advertence a fee amount. Actualize a mutator method, setFeeAmount, and alarm it from the constructor. If the fee bulk is negative, the setFeeAmount should set it to zero. Chic CheckingAccount should redefine methods Acclaim and Debit so that they decrease the fee from the annual antithesis whenever either transaction is performed successfully. CheckingAccount’s versions of these methods should adjure the base-class Annual to accomplish the updates to an annual balance. CheckingAccount’s Debit adjustment should allegation a fee alone if money is absolutely aloof (i.e. the debit bulk does not beat the annual balance.) [Hint: Define Account’s Debit adjustment so that it allotment a bool advertence whether money was withdrawn. Again use the acknowledgment bulk to actuate whether a fee should be charged.] Finally, actualize a adjustment in this acquired chic that overrides the PrintAccount adjustment in the abject class. In it, alarm the abject chic adjustment to book out the account’s name, number, and balance, and accommodate cipher in the acquired class’s adjustment to book out the advice specific to the acquired chic (i.e. FeeCharged). After defining the classes in this hierarchy, address an appliance that creates one article of anniversary acquired chic and tests their methods. Add absorption to the SavingsAccount article by aboriginal invoking its CalculateInterest method, again casual the alternate absorption bulk to the object’s Acclaim method. The adjustment of contest should be performed as follows:  1. Actualize a new blockage annual object. Assign it an antecedent antithesis of $1,000. The annual name should be your aftermost name concatenated with the chat “Checking”, and the annual cardinal should be 1. The fee answerable should be 3.00. Book a description of this transaction (i.e. "Created blockage annual with $1,000 balance.") 2. Actualize a new accumulation annual object. Assign it an antecedent antithesis of $2,000. The annual name should be your aftermost name concatenated with the assignment “Savings”, and the annual cardinal should be 2. The absorption bulk should be 5%.  Print a description of this transaction (i.e. "Created accumulation annual with $2,000 balance.") 3. Book the blockage annual object’s information. 4. Book the accumulation annual object’s information 5. Drop $100 in the blockage annual and book a description of this transaction (i.e. "Deposit $100 into checking.")  (this should accomplish a fee answerable as well) 6. Book the blockage annual object’s information 7. Abjure $50 from the blockage annual and book a description of this transaction (i.e. "Withdraw $50 from checking.")  (this should accomplish a fee answerable as well) 8. Book the blockage annual object’s information 9. Try to abjure $6,000 from the blockage annual and book a description of this transaction (i.e. "Withdraw $6,000 from checking.")  (This should not accomplish a fee but instead aftermath an absurdity bulletin that the user has Insufficient Funds. The antithesis should abide unchanged.) 10. Book the accumulation annual object’s information 11. Drop $3,000 in the accumulation annual and book a description of this transaction (i.e. "Deposit $3,000 into savings.") 12. Book the accumulation annual object’s information 13. Abjure $200 from the accumulation annual and book a description of this transaction (i.e. "Withdraw $200 from savings.") 14. Book the accumulation annual object’s information 15. Calculate the absorption on the accumulation annual and book a description of this transaction (i.e. "Calculate Absorption on savings.") 16. Book the accumulation annual object’s information 17. Try to abjure $10,000 from the accumulation annual (This should aftermath the Insufficient Funds absurdity bulletin and leave the antithesis unchanged.) Book a description of this transaction (i.e. "Withdraw $10,000 from savings.") 18. Book the accumulation annual object’s information

Order a unique copy of this paper

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
Top Academic Writers Ready to Help
with Your Research Proposal
Order now and a get a 25% discount with the discount code: COURSEGUYOrder Now!
+ +