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 account balance. -intrate: holds the interest rate for the period. -interest: hold 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 - takes an argument that is the amount of the withdrawl. this value is subtracted from the balance property, unless the withdrawl amount is greater than the balance. if this happens, an error is displayed. *calcinterest - this methosd 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 withdrawls 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
★★★★★
3.33 Rating (162 Votes )
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
instance variables private double balance priv... View full answer
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
