Java Java Data Structures Efficiency! Custom Serialization

Sean Flanagan
Sean Flanagan
33,221 Points

Problems with Karaoke class

Hi. I've picked up some errors with my Karaoke class.

import com.teamtreehouse.model.KaraokeMachine; //error here
import com.teamtreehouse.model.Song;
import com.teamtreehouse.model.SongBook;

public class Karaoke {
  public static void main(String[] args) {
    SongBook songBook = new SongBook();
    songBook.importFrom("songs.txt");
    KaraokeMachine machine = new KaraokeMachine(songBook); //2 errors here
    machine.run();
    System.out.println("Saving book...");
    songBook.exportTo("songs.txt");
  }
}

Errors:

Karaoke.java:1: error: cannot find symbol                                                        
import com.teamtreehouse.model.KaraokeMachine;                                                   
                              ^                                                                  
  symbol:   class KaraokeMachine                                                                 
  location: package com.teamtreehouse.model                                                      
Karaoke.java:9: error: cannot find symbol                                                        
    KaraokeMachine machine = new KaraokeMachine(songBook);                                       
    ^                                                                                            
  symbol:   class KaraokeMachine                                                                 
  location: class Karaoke                                                                        
Karaoke.java:9: error: cannot find symbol                                                        
    KaraokeMachine machine = new KaraokeMachine(songBook);                                       
                                 ^                                                               
  symbol:   class KaraokeMachine                                                                 
  location: class Karaoke                                                                        
3 errors 

Any help as ever would be appreciated. :-)

1 Answer

Joseph Anderson
Joseph Anderson
10,617 Points

KaraokeMachine is not in the model package/folder so you need to remove "model" form the import Statement, I believe.