org.cfpm.caves.za
Class BurialSociety

java.lang.Object
  extended by org.cfpm.caves.za.Group
      extended by org.cfpm.caves.za.SavingsClub
          extended by org.cfpm.caves.za.BurialSociety

public class BurialSociety
extends SavingsClub

A burial society is a community insurance that pays out money when a relative of a member dies. Monthly fees have to be paid in order to get anything. If someone can't pay there's a grace period of 3-6 months. If they pull out of the society they don't get any money (i.e. it's NOT a savings club!) Members usually try to stick with the society as long as possible.

Author:
Ruth

Field Summary
(package private)  double payoutSum
          the standard sum paid out for a burial.
 
Fields inherited from class org.cfpm.caves.za.SavingsClub
holdings, monthlyFee, onGrace
 
Fields inherited from class org.cfpm.caves.za.Group
memberIDs, members, model, name, pcs
 
Constructor Summary
BurialSociety(double holdings, java.util.ArrayList<Person> members, SouthAfricaModel model)
          Creates a new burial society for the given members with the given holdings.
 
Method Summary
 void addMember(Person member)
          lets the given person join this burial society
 void payIn(Person member, double amount)
          lets the given member pay in their monthly fee (or more in case they have to pay off a grace period)
 double payOut(java.lang.String requestingMemberName, java.lang.String deceasedName)
          pay out to the requesting member for the burial of the deceased person
 double payOut(jess.Value requestingMember, jess.Value deceased)
          pay out to the requesting member for the burial of the deceased person
 void removeMember(Person member)
          lets the given person leave this burial society
 
Methods inherited from class org.cfpm.caves.za.SavingsClub
getGracePeriods, getHoldings, getMembersOnGrace, getMonthlyFee, requestGracePeriod, setHoldings, setMonthlyFee
 
Methods inherited from class org.cfpm.caves.za.Group
addPropertyChangeListener, getMemberIDs, getName, removePropertyChangeListener, setMemberIDs, setName, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

payoutSum

double payoutSum
the standard sum paid out for a burial. Default is 2000 Rand.

Constructor Detail

BurialSociety

public BurialSociety(double holdings,
                     java.util.ArrayList<Person> members,
                     SouthAfricaModel model)
Creates a new burial society for the given members with the given holdings.

Parameters:
holdings - the holdings
members - the list of members
model - the model
Method Detail

addMember

public void addMember(Person member)
lets the given person join this burial society

Overrides:
addMember in class Group
Parameters:
member - the new member

removeMember

public void removeMember(Person member)
lets the given person leave this burial society

Overrides:
removeMember in class SavingsClub
Parameters:
member - the leaving member

payOut

public double payOut(jess.Value requestingMember,
                     jess.Value deceased)
pay out to the requesting member for the burial of the deceased person

Parameters:
requestingMember - the member requesting a payout
deceased - the person whose burial is covered by this burial society
Returns:
amount paid out (<= standard payout)

payOut

public double payOut(java.lang.String requestingMemberName,
                     java.lang.String deceasedName)
pay out to the requesting member for the burial of the deceased person

Parameters:
requestingMemberName - name of the member requesting a payout
deceasedName - name of the person whose burial is covered by this burial society
Returns:
amount paid out (<= standard payout)

payIn

public void payIn(Person member,
                  double amount)
lets the given member pay in their monthly fee (or more in case they have to pay off a grace period)

Overrides:
payIn in class SavingsClub
Parameters:
member - the member paying in
amount - the amount paid in