Question: In this assignment, students shall practice mass processing of a large number of user (or customer) objects in Java (in an application solution called BigDataThreads.java

In this assignment, students shall practice mass processing of a large number of "user (or customer)" objects in Java (in an application solution called BigDataThreads.java).

You may use an ArrayList or an Array (or some other List/File types) for this assignment.

Please follow the detail requirements below (with the required steps #s in bold):

#1. Create something in java to store thousands of users (or customers) objects. You can use Array/ArrayList/etc for those objects. For this assignment, you can use a simple (dummy) users/customers with a unique ID and some random customer name plus other fields of your choice.

/*Optionally, you can use your complex user/customer class from your previous assignments. If you opt to use a complex user/customer class, you need to make sure they are working codes of your own from HW1 and HW2. */

#2. Create 1,000 user/customer objects for the new customers. Place them into the list you declared in step #1. Write a Runnable task to accomplish this process of creating those

#3. In the meantime, continually remove the user/customer objects from your list. Write a Runnable task with a loop of 1,000 removal steps.

#4. (Optional) you may also have a processing thread if you choose to process the objects further between enter and exit. But you do not have to do #4 as this is optional.

#5. Make sure that the processing are concurrent/parallel in steps 2 and 3. /* If you implement the optional step 4 , it has to run in parallel with steps 2&3. */

Print the total # of user/customer(s) left in your list after steps 1~4. You do not need to print each object details; only print the total # left in your list.

Please submit screen captures to show that you have done at least 2 run(s) to see different #s at the end of each run before you implement next requirement in #6.

#6. Implement additional control to make sure the removal process is NOT ahead of the user/customer object creation process AND make sure that the creation process has to pause when the list has reach capacity. The creation process continues when one or more objects are removed to allow new objects. Then create more objects to flood the list capacity you got from step #1.

Submit another screen capture to show the total # of users/customers left after you added the additional thread control.

#7. Make sure you also add comments in your java codes to document your solutions.

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!