Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

What is the output? Clab class 1- Build a club class that has the following attributemembers with type Arralist. Members store the members objects regissered

What is the output?

image text in transcribed
Clab class 1- Build a club class that has the following attributemembers with type Arralist. Members store the members objects regissered in the club. 2- Build a constructor with no paranseter that is only responsible for declaring and creating the members Arraylist. 3. Create a method addMembers to add a member object in the Arrayliat. 4- Create a nsethod removeMembers to remove a member object located at a specific index from the Arraylist. 5. create a methed 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 equabo 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 paramcters. 4- Build getter methods for all the attributes. 5. Build setter methods for all the attributes. 6- Build toStringe) to reture 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,mb (asing the defuult censtructor) and add them in the members Arraylist in the cl 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 Amaylist in the cl object using removeMerabers method created above. 5. Use for loop to priat the data of all the members objects (name and id), using act(inderi) method and getter methods. 6- Call the SearchMemeberi member x) method on the object cl. 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: 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Theory Icdt 99 7th International Conference Jerusalem Israel January 10 12 1999 Proceedings Lncs 1540

Authors: Catriel Beeri ,Peter Buneman

1st Edition

3540654526, 978-3540654520

More Books

Students also viewed these Databases questions