Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Java: How would you match together random person objects from an ArrayList to make a random group of Pairs and add them to an

image text in transcribed

In Java: How would you match together random person objects from an ArrayList to make a random group of Pairs and add them to an ArrayList so that each Person has a match and the same person doesn't have the multiple have multiple matches? Example Rob can not be person1 in pair more than once and also can not be person2 in pair more than wants, but has to be both a person1 and person2 just not in the same pair.

public class Person private String name; private String age public class Pair private Person personl; private Person person2 Pair (Person person1 Person person2) More Codex /*This is where the help is need*/ public class Match private ArrayList pairs private ArrayList people; More Codex/

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

Step: 3

blur-text-image

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 Programming With Visual Basic .NET

Authors: Carsten Thomsen

2nd Edition

1590590325, 978-1590590324

More Books

Students also viewed these Databases questions

Question

8. Design office space to facilitate interaction between employees.

Answered: 1 week ago