Java Program BANKACCOUNT AND PROGRAM2
Subject
Computer Science
Question Description
Enter the code for the two classes "BankAccount.java" and "Program2.java" shown below. The Program2 class is the driver class that uses the BankAccount worker class to implement the application. Note that this version of the BankAccount class accepts a monthly interest rate in decimal format that must be calculated by the user.
/**
* BankAccount class
* This class simulates a bank account.
*
* (Taken from "Starting Out with Java - Early Objects
* (Third Edition) by Tony Gaddis, 2008 by Pearson Educ.)
*
*/
public class BankAccount
{
private double balance; // Account balance
private double interestRate; // Interest rate
private double interest; // Interest earned
/**
* The constructor initializes the balance
* and interestRate fields with the values
* passed to startBalance and intRate. The
* interest field is assigned to 0.0.
*/