Array Lists and Club class
I have tried several times but can't seem to figure it out:
4.26(From: Objects First with JAVA | A practical introduction using Blue J):
Complete the numberOfMembers method to return the surrent size of the collection.
This is what I have...
Yes, it will always return 0 but the next step is adding a join method which I think I can do.
public class Club
private ArrayList<memberships> members;
* Constructor for objects of class Club
members = newArrayList<memberships> members;
* Add a new member to the club's list of members.
* @param member The member object to be added.
public void join(Membership member)
* @return The number of members (Membership objects) in
* the club.
public int numberOfMembers()