main_marking2/danube_test7a.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Mon, 10 Jan 2022 13:51:59 +0000
changeset 421 e97c577bdc24
parent 389 4113d4d8cf62
permissions -rw-r--r--
added feedback


import CW7b._

val urban_recs = 
  Map("1" -> List("b", "a"), 
      "2" -> List("y", "x"), 
      "3" -> List("a", "c"))

val urban_names = Map("a" -> "A", "b" -> "B", "c" -> "C", "x" -> "X", "y" -> "Y")

assert(most_recommended(urban_recs, urban_names).toSet ==
        Set(("A",2), ("B",1), ("C",1), ("X",1), ("Y",1)))