Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem Implement a programme in Java that simulates the execution tasks in the image below. Challenges 1 . Object - Oriented Decomposition must be used
Problem
Implement a programme in Java that simulates the execution tasks in the image below.
Challenges
ObjectOriented Decomposition must be used and ObjectOriented Principles applied.
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 hardcoded. 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
Bubble Sort Input size between to integers.
Linear Search Input size between to integers.
Random String Generator Read a text file from the file system and select a substring of between characters then base encode the string.
Task Generator
The Task Generator must create all of the tasks before the first task is executed. tasks must be created.
Publishes between Tasks every 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
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.
SingleTaskManager and MultipleTaskManager must not be executed concurrently.
The task managers must use separate csv files as output.
The text file used by Random String Generator must be opened with readonly access and close after being read.
For the Bubble Sort and Linear Search tasks, the inputs must be prepared by the Task Generator. For the Random String Generator task, the substrings start and end must be determined by the Task Generator.
Execute the programme 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
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started