Account Class

You are a programmer for the Home Software Company. You have been assigned to develop a class that models the basic workings of a bank account. The class should have the following properties:

  • Balance:Holds the current account balance.
  • IntRate:Holds the interest rate for the period.
  • Interest:Holds the interest earned for the current period.
  • Transactions:Holds the number of transactions for the current period.

The class should also have the following methods:

  • MakeDeposit Takes an argument, which is the amount of the deposit. This argument is added to the Balance property.
  • WithdrawTakes an argument that is the amount of the withdrawal value is subtracted from the Balance property, unless the drawal amount is greater than the balance. If this happens, an error message is displayed.
  • CalcInterest This method calculates the amount of interest for the current period, stores this value in the Interest property, and adds it to the Balance property.

Demonstrate the class in an application that performs the following tasks:

  • Allows deposits to be made to the account.
  • Allows withdrawals to be taken from the account.
  • Calculates interest for the period.
  • Reports the current account balance at any time.
  • Reports the current number of transactions at any time.
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.