Write a program that represents memorising words from the English language that start with the letter A.

To solve this problem, a thread pool is required with a fixed size (more than one thread). When a thread runs, it reads and removes a word from the provided "words.txt" file and then after some time (sleeps) writes it to the memory.txt file (you will need to create this file). The threads in the pool are started and they will continue to run until all the words have been transferred.

It is important that your code is thread safe to prevent words from being lost or duplicated in both files.

Your main() method should create a thread pool of a fixed size and have threads running until all the words have been transferred.

You are required to use the use the ExecutorService and the Executors classes, Threads and Java IO to complete this assignment.

This is a useful link: https://www.journaldev.com/1069/threadpoolexecutor-java-thread-pool- example-executorservice

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.