Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Scheduling with deadline. Suppose that you have N tasks to schedule. Each task t

ID: 3691849 • Letter: S

Question

Scheduling with deadline. Suppose that you have N tasks to schedule. Each task takes 1 unit of time and has a deadline by which time it is expected to finish. If a task is not completed by its deadline, you pay a $1,000 fine. Find a schedule that minimizes the penalty. Hint: schedule the tasks in order of their deadline, but don't bother with any task that won't finish by its deadline. Using piority queue in blue j for java Scheduling with deadline. Suppose that you have N tasks to schedule. Each task takes 1 unit of time and has a deadline by which time it is expected to finish. If a task is not completed by its deadline, you pay a $1,000 fine. Find a schedule that minimizes the penalty. Hint: schedule the tasks in order of their deadline, but don't bother with any task that won't finish by its deadline. Using piority queue in blue j for java

Explanation / Answer

Files and Classes description:

Entry.java

Job.java

HeapPriorityQueue.java

PriorityQueueProject.java

public class Entry { private int value; //private fields private Job job; // object of job type public Entry(int v, Job j){ //constructor to set the above private fields setValue(v); // calling setValue function to set v setJob(j); //calling setjob function to set Job object j } public int getValue() { // function to get Value return value; } public void setValue(int v) { //setvalue goes here value = v; } public Job getJob() { // getjob goes for job object return job; } public void setJob(Job j) { // set job goes here job = j; } public String toString(){ // overriding toString mehod in Object class return job.toString(); } }
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote