Results 1 to 4 of 4
Thread: Question on dependency execution
- 05-02-2010, 02:18 AM #1
Member
- Join Date
- May 2010
- Posts
- 2
- Rep Power
- 0
Question on dependency execution
Hi,
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.
-Thanks
- 05-02-2010, 05:06 AM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
More likely you can handle the situation by defining several methods. You have to define what's the order to execute them according to the requirment.
- 05-02-2010, 07:15 AM #3
Member
- Join Date
- May 2010
- Posts
- 2
- Rep Power
- 0
Thanks for ur reply...I was looking into the digraphs algorithm to see if that can be a possible solution
- 05-02-2010, 07:35 AM #4
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,413
- Blog Entries
- 7
- Rep Power
- 17
Your problem is a Program Evaluation and Review Technique (PERT) problem wich is part of the CPM (Critical Path Method). Once you get the idea it's easy to solve.
kind regards,
Jos
Similar Threads
-
Dependency and exclusion
By Abder-Rahman in forum XMLReplies: 0Last Post: 09-18-2009, 05:09 PM -
Maven Dependency Overview 1.1
By Java Tip in forum Java SoftwareReplies: 0Last Post: 07-02-2008, 07:13 PM -
Maven Dependency Overview 1.0
By Java Tip in forum Java SoftwareReplies: 0Last Post: 04-15-2008, 06:52 PM -
What are dependency injection and its advantages
By JavaBean in forum Java TipReplies: 0Last Post: 09-26-2007, 08:27 PM -
Dependency Analyzer 1.0.3-rc0
By levent in forum Java SoftwareReplies: 0Last Post: 07-30-2007, 04:34 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks