Question: For this assignment, you will acquaint yourself with the DJ and DISM languages by implementing one small program in each language. You will write a

For this assignment, you will acquaint yourself with the DJ and DISM languages by implementing one small program in each language. You will write a DJ program in a file called edgy.djand a DISM program in a file called edgy.dism.

Both programs should input a sequence of directed edges in a 100-node graph and then output allthe nodes reachable in one step from given source nodes. Nodes are numbered from 1 to 100. The user enters a sequence of edges as pairs of natural numbers; the first number in each pair denotes the source node, and the second number denotes the target/destination node. Self-loops are allowed, so for example, (4,4) is a valid edge. The user indicates that all edges have been input by entering a 0 as a source or destination node. After entering that first 0, the user may enter a sequence of node numbers; for each such number n, a list of all the nodes reachable in one step from node nmust be output, with the nodes output in ascending order without repeating numbers. The user may terminate this entry of a sequence of node numbers by entering a second 0.The user may also terminate execution at any time by entering a number greater than 100.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!