Part I, due Friday, March 19, 1999. Part II, due Friday, March 26, 1999.
In this project for cse3001/cse5040 you are to write a Modula-3 program using generic modules to solve a problem. The project is divided into two parts.
You may work together in groups of up to two people for the two parts As long as you work with someone different than on the previous project.
mkdir partI partI/src
cp ~ryan/public_html/m3/programs/north/src/Input.m3 partI/src cp ~ryan/public_html/m3/programs/north/src/*LinkedList.[im][g3] partI/src
chmod -w *LinkedList.[im][g3]
import(libm3) implementation(Input) program(input) % name of the executable file will be "input"
setenv PATH /software/modula-3/bin/:/software/gnu/bin/:$PATH; rehashNB. Like all software in the directory /software the Modula-3 compiler is for a Sun Solaris machine (not the SGIs).
generic_module(LinkedList) module(TextLinkedList)As the module Input will now also import TextLinkedList these lines must come before the line implementation(Input).
~ryan/bin/mfiles "ryan@cs" "part I" Input.m3
A list of submissions for part I is maintained by hand (and so may not be current).
city1 city2The first city of the pair is given to be south of the second city. The second set of data also consists of many pairs of cities. For each pair in the second set of data, the program is to print one of the following lines of output:
city1 is south of city2. city1 is north of city2. The relative position of city1 and city2 is unknown.
The relation "is south of" is a transitive relationship, so if city1 is south of city2 and city2 is south of city3, then city1 is south of city3. You may assume that the input is consistent, that is, there will be no information that indicates a city is north of itself.
Melbourne DaytonaBeach DaytonaBeach Jacksonville Orlando Jacksonville # Melbourne Jacksonville Tampa Melbourne Jacksonville Orlando Orlando DaytonaBeach #the output should be
Melbourne is south of Jacksonville. The relative position of Tampa and Melbourne is unknown. Jacksonville is north of Orlando. The relative position of Orlando and DaytonaBeach is unknown.
~ryan/bin/mfiles "ryan@cs" "part II" m3makefile ...Use the modules LinkedList and TextLinkedList in your program, but do not send me them back to me.
A list of submissions for part II is maintained by hand (and so may not be current). Only the last submission from a login counts. All previous submissions are ignored.
module(X) module(XLinkedList)The order of the lines in the m3makefile are important.
For those that need help solving the problem a psuedo-code outline of the solution is available.