Page 1 of 1

JAVA List Collections (10 marks) Consider a class Club that is intended to store a list of Person objects in a field var

Posted: Mon Jun 06, 2022 1:30 pm
by answerhappygod
JAVA
List Collections
(10 marks) Consider a class Club that is intended to
store a list of Person objects in a field variable called
members.
3a) (2 marks) Write a Java declaration for the members
field.
3b) (3 marks) Write a Java method to add a new member to the
club, but only if the parameter has already been created.
3c) (3 marks) Assume that the Person class has a method with
signature boolean feesDue(Person pp) that returns true if the
person’s membership fees are due and false otherwise.Using this
method, write a method for the Club class called makeBillingList
that returns a list of all members whose membership fees are
currently due.
3d) (2 marks) Explain a strategy for implementing the Person
class method boolean feesDue(Person pp) used in question 3c. You
don’t need to write the full code. Just give a description in
English of how you would do it. What are the field variables that
would be needed in the Person class? How would the method be
implemented?