Answered step by step
Verified Expert Solution
Link Copied!

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
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 substrings 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
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Expert Performance Indexing In SQL Server

Authors: Jason Strate, Grant Fritchey

2nd Edition

1484211189, 9781484211182

More Books

Students also viewed these Databases questions

Question

2. Do you agree that unions stifle creativity? Why or why not?

Answered: 1 week ago