question archive Data format: email, name Input file: customerData
Subject:Computer SciencePrice: Bought3
Data format: email, name
Input file: customerData.txt
UserInput.txt
customerData.txt Data:
asbhgki@ gmail.com, asbhgki
abhuko@ gamil.com, abhuko
abjujki@ gmail.com, abjuki
nuknui@ gmail.com, nuknui
bhukso@ gmail.com, bhukso
bdhgeip@ gmail.com,bdhgeip
njwdlik@ gmail.com, njwdlik
najeijl@ gmail.com, najeijl
.......
UserInput.txt data:
asbhgki@ gmail.com
abhuko@ gamil.com
abjujki@ gmail.com
nuknui@ gmail.com
bhukso@ gmail.com
bdhgeip@ gmail.com
njwdlik@ gmail.com
.......
Each line in userInput.txt contains a user name (email address)
Please develop a Java program to
1. Use java.util.TreeSet to read the record from customerData.txt
2. Show the memory used by the java.util.TreeSet data structure.
3. Read lines from userInput.txt and search for the java.util.TreeSet data structure.
Repeat this search operation 6,000 times.
4. Show the CPU time used in the above search operation.
5. Use java.util.HashSet to read records from customerData.txt
6. Show the memory used by the java.util.HashSet data structure.
7. Read the line from userInput.txt and search for the java.util.HashSet data structure.
Repeat this search operation 6,000 times.
8. Show the CPU time used in the above search operation.