Question: Write a Java program that does the following: Club class 1- Build a club class that has the following attribute: members with type Arralist. Members

Write a Java program that does the following:
Club class
1- Build a club class that has the following attribute:
members with type Arralist. Members store the members objects registered in the club.
2- Build a constructor with no parameter that is only responsible for declaring and creating
the members Arraylist.
3- Create a method addMembers to add a member object in the Arraylist.
4- Create a method removeMembers to remove a member object located at a specific index
from the Arraylist.
5- create a method SearchMemeber(member ) that accepts a member object x as a
parameter, then compare it to all other member objects in the Arraylist using for loop and
equals method. If the object x found to be equal to an object in the Arraylist, exit the
method and print the object x found in the Araaylist.
Member class
1- Build a member class that has the following attribute:
Name(String), and id(int)
2- Build a constructor with two parameters (name, id) and initialize the attributes
accordingly.
3- Build a default constructor with no body and parameters.
4- Build getter methods for all the attributes,
5- Build setter methods for all the attributes.
6- Build toString0 to return string representation of all the attributes,
Main method
1- Create a club class object named cl.
2- Use for loop to create three members objects m1,m2,m3 (using the default constructor)
and add them in the members Arraylist in the el object using the addMembers method
created above.
3- Use for loop to set the values of name and id for all the three members objects using the
setter methods created above.
4- Delete the member located in index 1 from the Arraylist in the cl object using
removeMembers method created above.
5-
Use for loop to print the data of all the members objects (name and id), using get(index)
method and getter methods.
6- Call the SearchMemeber(member x) method on the object c1.
7- Finally use clear method to remove all objects from the members arraylist.
Arrays of Arrays
1- Create two-dimensional arrays and give values as follows:
2
4789
3 2
5 9
Use tow for loops to sum all the values in the 2-d array and print the final result of
 Write a Java program that does the following: Club class 1-
Build a club class that has the following attribute: members with type

Clab class 1. Build a club class that has the following attribute: members with type Arralist. Members store the members objects regisscred in the club. 2- Build a constructor with no parameler that is only responsible for declaring and creating the members Arraylist. 3. Create a method addMembers to add a member object in the Arraylist. 4- Create a method removeMembers to remove a member object located at a specific index. from the Amaylist. 5. create a method SearchMemeber(member x ) that accepts a member object x as a parameter, then compare it to all other member objects in the Arraylist using for loop and equalso method. If the object x found to be equal to an object in the Arraylist, exit the method and print the object x found in the Ararylist. Member class 1- Build a member class that has the following attribute: Name(String), and id(int) 2- Build a constructor with two parameters (name, id) and initialine the attributes accordingly, 3- Build a default constructor with no body and parameters. 4- Build getter methods for all the attributes. 5. Build setter methods for all the attributes. 6- Build toString() to return string representation of all the attributes. Main methed 1- Create a club class object named cl. 2- Use for loop to create three members objects ml,m2,m3 (using the defuult constructor) and add them in the members Arraylist in the el object using the addembers method created above. 3. Use for loop to set the values of name and id for all the three members objects using the setter methods created above. 4- Delcte the member located in index 1 from the Amrylist in the cl object using removeMermbers metbod ereated above. 5. Use for loop to print the data of all the members objects (name and id), using act(inderi) method and getter methods. 6- Call the SearchMemeberimember x) method on the object c1. 7- Finally use clear nethod to remove all objects from the members arraylist. Arrays of Arrays 1- Create two-dimensional arrays and give values as followx 478932159 2. Use tow for loops to sum all the values in the 2-d array and print the final result of summation. 1- Create two-dimensional arrays and give values as follows: 435729819 2. Use tow for loops to sum all the values in the 2-d array and print the final result of summation

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!