Question
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
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 argu- ment is added to the Balance property. Withdraw Takes 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. 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
Language C++
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started