I am trying to code a problem in Java where I have to execute a bunch of tasks.
Problem
Execute a job which consists of multiple tasks and thos
Abstracting from the multithreading
class TaskA{
SimpleTask Y;
SimpleTask Z;
SimpleTask PJ;
SimpleTask RJ;
Run(){
// do the partial job
PJ.Run();
Y.Run();
// do the remaining job
RJ.Run();
Z.Run();
// return;
}
}
class TaskB{
TaskA P;
SimpleTask J;
Run(){
// do the job
J.Run();
P.Run();
// return;
}
}