Question: Scheduling is an important activity that not only encompasses many everyday tasks (e.g., determining which classes to take each semester to graduate on time) but
Scheduling is an important activity that not only encompasses many everyday tasks (e.g., determining which classes to take each semester to graduate on time) but is also used to optimize performance of applications, services, and utilization of computer resources. Understanding the scheduling problem is important because it covers important concepts and topics in computer science.
Definitions and Specifications:
A task (e.g., A B C ...) can be completed during a level only if it has no dependencies or all its dependencies have been have been completed.
A dependency: (A, B) indicates that task A has to be completed before B.
A task list is a list of all tasks to be completed.
A dependency list is a list of all dependencies considered.
The task list and dependency list will be read from a text file. The task list and the dependency list considered can be modified during run time using user inputs.
The task list and dependency list is read into the application from a single text file (taskData.txt). The taskData.txt file should follow the format: (1) the first line in the txt file list all the task to be completed, separated by a space (2) the second line list all the dependencies (3) a dependency is given as two task inside a parenthesis separated by a comma (4) the first task given in the dependency must be completed before the second task in the dependency can be completed (5) the dependencies in the second line are separated by a space.
Given the data in the taskData.txt, provide the following:
1) a valid ordering of task if one exist; 2) if no valid ordering is possible, identify a cycle that prevents a valid ordering; 3) if a valid ordering exist, indicate whether or not the there is more than one; and 4) the minimum number of levels needed to complete all tasks. 5) the option to keep adding tasks and dependencies and getting the information provided in 1-4 using the amended task list and dependencies.
Example Interaction 1:
When the data in taskData.txt is ABCDEFG (A,B) (C,D) (A,C) (C,E) (E,G) (F,G) (B,E) (D,F)
Welcome to my Task Scheduling Project:
A valid ordering of tasks is as follows:
ABCDEFG This is NOT the only valid ordering of task.
The minimum number of levels is five.
Select: (a) add task (b) add dependencies (c) quit
>> a
What tasks to you want to add?
>> H I
What dependencies does H have?
>> C
What tasks depend on H?
>> I
What dependencies does I have?
>> D
What depends on I?
>>
Do you want to add additional dependencies? (Y/N)
>> Y
What dependencies do you want to add?
>> (I, B) (F, I)
A valid ordering of tasks is as follows:
ACHDEFIGB This is NOT the only valid ordering of task.
The minimum number of levels is six.
Select: (a) add task (b) add dependencies (c) quit
>> b
What dependencies do you want to add?
>> (F,C)
There is NO valid ordering of task.
There is a cycle: C D F C
Example Interaction 2:
When the data in taskData.txt is
ABC (A,B) (B,C) (A,C)
Welcome to my Task Scheduling Project:
A valid ordering of tasks is as follows:
A B C This is the ONLY valid ordering of task.
The minimum number of levels is three.
Select: (a) add task (b) add dependencies (c) quit
>> c
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
