//******************************************************************** // Account.java // // Represents a bank account with basic services such as deposit // and withdraw. //******************************************************************** public class Account { private final double RATE = 0.035; // interest rate of 3.5% private long acctNumber; private double balance; private String name; //----------------------------------------------------------------- // Sets up the account by defining its owner, account number, // and initial balance. //----------------------------------------------------------------- public Account (String owner, long account, double initial) { name = owner; acctNumber = account; balance = initial; } //----------------------------------------------------------------- // Returns the current balance of the account. //----------------------------------------------------------------- public double getBalance () { return balance; } //----------------------------------------------------------------- // Prints a description of the account. //----------------------------------------------------------------- public void printInfo () { System.out.println("Acct# =" + acctNumber); System.out.println("Name =" + name); System.out.println("Balance = $" + balance); System.out.println(); } }