Problem

Account ClassYou are a programmer for the Home Software Company. You have been assigned to...

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.

withdraw lakes an argument that is the amount of the withdrawal. This value is subtracted from the Balance property, unless the with drawal amount is greater than the balance. If this happens, an error message is displayed.

Calclnterest 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.

Dremonstrate 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.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT