Question: *IMPORTANT* NO METHODS, MUST USE A WHILE LOOP TO CHECK IF THE ELEMENT IS IN THE SET, IF NOT THEN STOP GOING THROUGH THE LOOP,BREAK
*IMPORTANT* NO METHODS, MUST USE A WHILE LOOP TO CHECK IF THE ELEMENT IS IN THE SET, IF NOT THEN STOP GOING THROUGH THE LOOP,BREAK OUT OF THE LOOP AND STATE THAT A IS NOT A SUBSET OF B. THANKS

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
Get step-by-step solutions from verified subject matter experts
