UML&OCL Modeling Languages


Practice (3a)

  1. Model with UML the following code.
Map m = new Map();
m.put("pomme","apple");
m.put("manger","eat");
String s = m.get("pomme");
System.out.println(s);
  1. Give a possible realization of Map(s) by using Java language.
  2. How to "generalize" code by using generics ?