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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

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

Post 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?
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply