Question 2: =========== You are asked to develop software for the following new version of the SDG game. The raw material is a collection of weighted constraints as in SDG(CSP) and all constraints are expressed as linear inequalities of the form: sum x_i = j sum x_i >= j sum x_i <= j Example of a raw material in this new form: 10 x1 x6 x8 = 1 3 x1 x5 x7 = 2 4 x1 x2 >= 1 200 x1 x2 <= 1 2 x2 = 1 The meaning of the first constraint 10 x1 x6 x8 = 1 is x1 + x6 + x8 = 1 with weight 10. The addition is integer addition but as usual, the variables only assume values 0 or 1. How would you manage this software development project? Develop a brief plan and write it down succinctly like: 1. Class dictionary for new notation. 2. Extend class dictionary to cover new and old notation. 3. Write DemeterF function object ... Design a class dictionary for inputting the new kind of raw material. Find the UNKNOWNs in the following class dictionary: CSP = ConstraintList. Constraint = *l UNKNOWN UNKNOWN UNKNOWN UNKNOWN. Kind : Exact | GreaterThanEqual | LessThanEqual. Exact = "=". GreaterThanEqual = ">=". LessThanEqual = "<=". Variable = Ident. Relation = int. Weight = int. Constant = int. ConstraintList : NECL | ECL. NECL = Constraint ConstraintList. ECL = . VariableList : NEVL | EVL. NEVL = Variable VariableList. EVL = . How would you leverage the current SDG(CSP) implementation? You must translate the new input format into an XML style input format and figure out a function relNumber(int numberOfvariables, Kind kind, Constant constant) that determines the relation number. For example, relNumber("3","=","1") = 22. Assume that this function is given to you and it currently is the constant 3000. Write a program to translate constraints of the new form: 10 x1 x6 x8=1 3 x1 x5 x7=2 4 x1 x2>=1 200 x1 x2<=1 2 x2=1 to constraints of the old XML style form: 103000 x1 x6 x8 33000 x1 x5 x7 43000 x1 x2 2003000 x1 x2 23000 x2 done Find the UNKNOWNS in the enclosed program: import edu.neu.ccs.demeterf.*; class Trans extends IDf{ UNKNOWN static CSP trans (Object o) { return new Traversal(new Trans()). UNKNOWN(o); } }