How can you compute the union and intersection of two sets


Problem

1. The union of two sets A and B is the set of all elements that are contained in A, B, or both. The intersection is the set of all elements that are contained in A and B. How can you compute the union and intersection of two sets, using the add and contains methods, together with an iterator?

2. How can you compute the union and intersection of two sets, using some of the methods that the java.util.Set interface provides, but without using an iterator? (Look up the interface in the API documentation.)

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: How can you compute the union and intersection of two sets
Reference No:- TGS02636906

Expected delivery within 24 Hours