title: Scala error - error: not found: type
body: <p>I am a Java developer trying to learn Class creation in Scala.</p>
  
  <p>I create two separate scala files.
  One file contains a trait. The second file extends the trait and defines a method. </p>
  
  <p><strong>Cola.scala</strong> This contains the trait.</p>
  
  <pre><code>trait Cola
  {
          def fizz(): String
  }
  </code></pre>
  
  <p><strong>Pepsi.scala</strong>  This has a class that tries to extend the trait.</p>
  
  <pre><code>class Pepsi extends Cola
  {
          override def fizz():String = "1 Sugar"
  }
  
  var p = new Pepsi
  println( " p = " + p.fizz )
  </code></pre>
  
  <p>When I excecute "scala Pepsi.scala" I get the following error message:</p>
  
  <pre><code> error: not found: type Cola
  class Pepsi extends Cola
  </code></pre>
  
  <p>Both files are in the same folder. </p>
  
  <p>Please help how to resolve this?
  I am using Scala 2.8
  I am not using an editor so that I will be forced from scratch. This is to improve my knowledge about computers.</p>