public Member(String firstName, String lastName, String contactPhone, String email, int memberID) { if (!sane(firstName, lastName, contactPhone, email, memberID)) { throw new ArgumentException("Member: constructor : bad parameters"); } this.firstName = firstName; this.lastName = lastName; this.contactPhone = contactPhone; this.emailAddress = email; this.id = memberID; this.loanList = new List<ILoan>(); this.fineAmount = 0.0f; this.state = MemberConstants.MemberState.BORROWING_ALLOWED; }
private void updateState() { if (BorrowingAllowed) { state = MemberConstants.MemberState.BORROWING_ALLOWED; } else { state = MemberConstants.MemberState.BORROWING_DISALLOWED; } }