I'm completely new to java. I'm trying the tackle this following scenario. For e.g. I've a list of “Tasks” and their dependencies. E.g. Task D depends on (Task A and Task B) , Task A depends on Task B, Task B depends on Task C.
I'm trying to write a program to print out the sequence of these tasks (For example, using the case above, it should be C, B, A, D).
1. What is the best way to approach this ?
2. What possible ways I can test this design?
3. How can I make sure that there's no circular dependency?
Any pointers will be highly appreciated.