Question: IMPORTANT* also when checking for if the set is a subset or not if the set ends up having a number that is not in

 IMPORTANT* also when checking for if the set is a subset

IMPORTANT* also when checking for if the set is a subset or not if the set ends up having a number that is not in the set It needs to break out of the loop and say "No, a is not a subset of B". im assuming using a while loop

Write a code in java that receives two sets A and B and decides whether ACB or not Input: m (a positive integer), n (a positive integer), a[1], a[2], ..., a[m] (a one dimensional array representing A), b[1], b[2], ..., b[n] (a one dimensional array representing B) Output: a string "yes" or "no" Output Example Enter m: 3 Enter n: 6 >> Enter elements of A: 3,6,8 >> Enter elements of B: 1,3,4,6,7,8 >>"Yes, A is a subset of B" Another output example Enter m: 4 Enter n: 5 >> Enter elements of A: 3,6, 8,9 >> Enter elements of B: 1,2,3, 6,9 >>"No, A is not a subset of B'" You are not allowed to use any packages or built in functions to find the answer directly

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!