The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 398 Weeks Ago, 6 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
Step 1: Create BankAccount class Create a new eclipse project titled Lab-JUnit. Create BankAccount class under package core. It should have the following attributes and methods:
A????1 accountNumber - String
A????1 accountHolder - String
A????1 balance - double (balance without interest added)
A????1 accountType - int (Account type can be either 1 - Savings, 2 - Award Savers, 3 - Checking, or 4 for Credit Card, anything other than these values should set to 0)
A????1 Two constructors: - default constructor (no parameters): Set balance=0, accountType=0, accountNumber=A????1noneA????1, accountHolder=A????1UnknownA????1 - Other constructor accepts user-entered values for all attributes
A????1 Gets and sets for all attributes (You donA????1t have to type up all the get and set methods. Use Eclipse to generate them automatically. Click on Source ? Generate Getters and Setters).
A????1 Method calculateTotalBalance () - returns the balance of the account after the interest has been applied. Formula for calculating the balance is:
totalBalance = balance + (balance ? interestRate/100).
The interest rate depends on the accountType:
- Savings: interest is 0.5%
- Award Savings: interest is 4.5%
- Checking: interest is 1.0% ???
- CreditCard: interest is 15%
- Other: return 0
A????1 Method getInterestRate that returns the interest rate depending on the type of account
Hel-----------lo -----------Sir-----------/Ma-----------dam----------- Â----------- Th-----------ank----------- Yo-----------u f-----------or -----------usi-----------ng -----------our----------- we-----------bsi-----------te -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill-----------