P1) Array Function
1-1) Write a function calculateUnion() that gets two arrays and finds the union of the elements of the two arrays. The function should return unique members (no duplicate members in the final result array).
1-2) Write a function calculateIntersection() that gets two arrays and finds the intersection of the elements of the two arrays. The function should return unique members (no duplicate members in the final result array).
1-3) Write a function calculateSetDiff() that gets two array arr1 and arr2 respectively and finds the arr1 – arr2 (all the elements that are a member of arr1 but not in arr2). The function should return unique members (no duplicate members in the final result array).
P2) Reading String and Creating a Table
We have the following data that we have read from the database. Each row is a single string.
1006 Barry Riles 559619412
1007 Cynthia Chance 456574136
1008 Justin Booth 629199458
1009 Darlene Ford 699943760
1010 Kevin Haynes 837467249
1011 Marjorie Broderick 696041024
1012 Robert Greco 689191573
1013 Lynn Cote 176484555
1014 Diane Wasser 239881571
1015 Fay Fay 772542172
1016 Joseph Thomas 607032507
1017 Molly Jones 560348529
1018 Richard Martinez 703071905
1019 Aaron Brown 421268302
1020 Lisa Cook 840376444
1) Put all the data in an array (each element of the array is a one row of data).
2) Then with a loop on this array, split each string into 4 parts: “ID”, “fName”, “lName” and “ssn” and store all the info in a new array.
3) Then run a loop on this new array and create a table that with columns “ID”, “fName”, “lName” and “ssn” and display the data in this table. The final output should be as follows.
will be added after our Thursday session.
How to submit you work?
1) Add all the code for both of the parts to a Microsoft Word Documents file, with some sample run results (screenshot) added to the file and attach it.
2) Put all your code in a separate folder and compress (zip) it and attach it as the second file.
3) Submit your assignment.
"Place your order now for a similar assignment and have exceptional work written by our team of experts, guaranteeing you A results."