Home / Expert Answers / Computer Science / problem-implement-a-programme-in-java-that-simulates-the-execution-tasks-in-the-image-below-challe-pa855

(Solved): Problem Implement a programme in Java that simulates the execution tasks in the image below. Challe ...



Problem Implement a programme in Java that simulates the execution tasks in the image below. Challenges 1. Object-Oriented Decomposition must be used and Object-Oriented Principles applied. 2. Two versions of the Task Manager must be implemented – a. SingleTaskManager – uses a Task Executor that runs a single thread. b. MultipleTaskManager – uses a Task Executor that runs multiple threads. Task A task represents a unit of work that must be done by the programme. Each task must be generated randomly. For example, bubble sort input must be randomly generated instead of being hard-coded. This way, different input sizes can be tested. Each task must produce an output. Finally, a task must be able to record information about its execution time, start time and end time. A task can be any of the following – 1. Bubble Sort – Input size between 5000 to 50000 integers. 2. Linear Search – Input size between 5000 to 20000 integers. 3. Random String Generator – Read a text file from the file system and select a substring of between 1000-5000 characters then base64 encode the string. Task Generator The Task Generator must create all of the tasks before the first task is executed. 250 tasks must be created. 1. Publishes between 1-20 Tasks every 3 seconds to the Task Collection for execution. Task Collection The Task Collection is a storage mechanism where the Task Generator publishes tasks, and the Task Executor reads tasks. Task Executor The Task Executor is responsible for taking a task from the Task Collection and running it. Once completed the task is passed to the Task Output Summarizer. Task Output Summarizer The Task Output Summarizer is responsible for exporting the execution information about each task to a .csv file. Experiment Design 1. Create a programme that executes the tasks produced by the Task Generator using both SingleTaskManager and the MultipleTaskManager. For each execution of the programme, both versions of the task manager must execute the exact tasks. 2. SingleTaskManager and MultipleTaskManager must not be executed concurrently. 3. The task managers must use separate .csv files as output. 4. The text file used by Random String Generator must be opened with read-only access and close after being read. 5. For the Bubble Sort and Linear Search tasks, the inputs must be prepared by the Task Generator. For the Random String Generator task, the substring’s start and end must be determined by the Task Generator. 6. Execute the programme 5 times, compile the .csv output and analyse the output based on the execution time, natures of tasks and distribution, and if the single or multiple task manager was used to create the output. The analysis must include three main outputs in addition to supporting information – a. SingleTaskManager Only – analyse and present the data produced. b. MultipleTaskManager Only – analyse and present the data produced. c. SingleTaskManager and MultipleTaskManager – compare and contrast the data produced by the in the two outputs. answer in java



We have an Answer from Expert

View Expert Answer

Expert Answer


We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe