File-to-fully qualified class name function
My current assumption is that the string returned by file.getPath is going to look something like ..\solutions\some-parent-dir\some-scala-file.scala 

If this is the case then you can try the following function:

def makeFqClassName(file: File): String = {
  val fileName :: _ = file.getName.split('.').toList
  val upDir :: upUpDir :: _ = file.getParent.split(File.separator(0)).toList.reverse
  s"$upUpDir.$upDir.$fileName"
}


I've introduced a smidgen of strange syntax just to show you a possibility. As a way of explaining what is going on, consider that the following are functionally equivalent:

  val foo :: _ = List(0, 1, 2, 3)
  val goo = List(0, 1, 2, 3).head


From the POV of operations performed they're unequivalent. 
foo is defined from the result of a pattern match that discards the tail of the list. goo as you know is the result of the invocation of the head method. (I suppose it could be the case that the compiler is smart enough to translate a pattern match on a list that only takes the head of the list into an invocation of the head method, but lets just ignore that for now :^) And a final example:

val a :: b :: c :: d :: ez = ('a' to 'z').toList


Here a , b , c , and d  are assigned the expected character values and ez is a list consisting of the characters e through z. 

If I've misunderstood what your asking for please let me know and I'll update this accordingly.