Account -...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: //******************************************************************** // Account.java Author: Lewis/Loftus // // Solution to Programming Project 5.7 //******************************************************************** import java.text.NumberFormat; public class Account implements Lockable { private NumberFormat fmt = NumberFormat.getCurrencyInstance(); private final double RATE = 0.035; // interest rate of 3.5% private long acctNumber; private double balance; private String name; private int accountKey; private boolean locked; //----------------------------------------------------------------- // Sets up the account by defining its owner and account number. // Initial balance is set to zero //----------------------------------------------------------------- public Account (String owner, long account) { name = owner; acctNumber = account; balance = 0.0; locked = false; accountKey = 0; } //----------------------------------------------------------------- // 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; locked = false; accountKey = 0; } //-----------------------------------------------------------------...
View Full Document

Page1 / 4

Account -...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online