clubs
Class FuneralClub

java.lang.Object
  extended by clubs.FuneralClub

public class FuneralClub
extends java.lang.Object

Handles the working of the Funeral Club/Burial Society

Author:
shah

Field Summary
private  int capacity
          Capacity of the funeral club
private  int currentFunds
          current funds of the funeral clubs
private  int id
          club id
private  int initialFunds
          Initial funds to start the funeral clubs
private  java.util.ArrayList<Household> members
          Members of the funeral clubs
private  java.util.ArrayList<Household> requests
          Requests to join the funeral clubs
 
Constructor Summary
FuneralClub()
          Default constructor
FuneralClub(int _id)
          Creates funeral club with _id
 
Method Summary
 void addContribution(int money)
          add contribution to the fund
 void addMember(Household _member)
          Add household as member
 int getCurrentFunds()
          Returns current funds of the funeral club
 int getId()
          Returns id of the funeral club
 java.util.ArrayList<Household> getMembers()
          Returns members of the funeral club
 boolean handleRequestMembership()
          If membership less than capacity
 void pay(Household household, int share)
          Household pays its share
 void removeMember(Household _member)
          Remove household from the funeral club
 void request(Household household)
          If a households defaults for some time and doesn't pay, then it doesn't get any help from the club, anymore after a grace period.
 void setCurrentFunds(int currentFunds)
          Sets current funds of the funeral club
 void setId(int id)
          Sets id of the funeral club
 void setMembers(java.util.ArrayList<Household> members)
          Sets members of the funeral club
 void step()
          Funeral clubs/burial societies give full amount to some, and a bit proportion of the rest pool to the others who've suffered a breavement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

private int id
club id


initialFunds

private int initialFunds
Initial funds to start the funeral clubs


currentFunds

private int currentFunds
current funds of the funeral clubs


members

private java.util.ArrayList<Household> members
Members of the funeral clubs


requests

private java.util.ArrayList<Household> requests
Requests to join the funeral clubs


capacity

private int capacity
Capacity of the funeral club

Constructor Detail

FuneralClub

public FuneralClub()
Default constructor


FuneralClub

public FuneralClub(int _id)
Creates funeral club with _id

Parameters:
_id -
Method Detail

getCurrentFunds

public int getCurrentFunds()
Returns current funds of the funeral club

Returns:

setCurrentFunds

public void setCurrentFunds(int currentFunds)
Sets current funds of the funeral club

Parameters:
currentFunds -

getId

public int getId()
Returns id of the funeral club

Returns:

setId

public void setId(int id)
Sets id of the funeral club

Parameters:
id -

getMembers

public java.util.ArrayList<Household> getMembers()
Returns members of the funeral club

Returns:

setMembers

public void setMembers(java.util.ArrayList<Household> members)
Sets members of the funeral club

Parameters:
members -

addMember

public void addMember(Household _member)
Add household as member

Parameters:
_member -

removeMember

public void removeMember(Household _member)
Remove household from the funeral club

Parameters:
_member -

addContribution

public void addContribution(int money)
add contribution to the fund

Parameters:
money -

handleRequestMembership

public boolean handleRequestMembership()
If membership less than capacity

Returns:

step

public void step()
Funeral clubs/burial societies give full amount to some, and a bit proportion of the rest pool to the others who've suffered a breavement. This is a stylized implementation.


pay

public void pay(Household household,
                int share)
Household pays its share

Parameters:
household -
share -

request

public void request(Household household)
If a households defaults for some time and doesn't pay, then it doesn't get any help from the club, anymore after a grace period.