title: Java several classes beginner struggle
body: <p>so I am currently taking an online coding class. and it has us make two different codes. one called SpaService. and one called CreateSpaService.
  From my understanding, these are supposed to work together, to call variable (etc.) but it is not working and I am being hit with syntax errors saying that variables are not declared, but I declared them in the other code.</p>
  <p>Am I supposed to put them in the same doc or something? I tried that and it still wouldn't work. Is there some way I have to link the two codes so they work together?
  Here are the two codes.
  also, do you see any syntax errors?
  Thank you so much</p>
  <pre><code>import java.util.Scanner;
  public class CreateSpaServices
  {
   public static void main(String[] args)
   {
     
     
     SpaService firstService = new SpaService();
     SpaService secondService = new SpaService();
     
    firstService = getData(firstService);
    secondService = getData(secondService);
  
     System.out.println(&quot;First service details:&quot;);
     System.out.println(firstService.getServiceDescription() + &quot; $&quot; + firstService.getPrice());
     
     System.out.println(&quot;Second service details:&quot;);
     System.out.println(secondService.getServiceDescrption() + &quot; $&quot; + secondService.getPrice());
      
   }
   public static SpaService getData(SpaService service)
   {
     String service;
     double price;
     Scanner keyboard = new Scanner(System.in);
     
     System.out.print(&quot;Enter service &gt;&gt; &quot;);
     service = keyboard.nextLine();
     System.out.print(&quot;Enter price &gt;&gt; &quot;);
     price = keyboard.nextDouble();
     keyboard.nextLine();
     service.setServiceDescription(Service);
     service.setPrice(price);
     return service;
   }
  }
  
  
  
  
  
  //here is other code, im not sure if where I put this, or if I keep it in its own document or in this doc.
  
  public class SpaService
  {
   private String serviceDescription;
    private double price;
    
    public SpaService()
    {
      serviceDescription = &quot;XXX&quot;;
      price = 0;
    }
    public void setServiceDescription(String service)
    {
      serviceDescription = service;
    }
    public void setPrice(double servicePrice)
    {
      price = servicePrice;
    }
    public String getServiceDescription;
    {
  return serviceDescription;
  }
  public double getPrice()
  {
    return price;
  }
  }
  
     
  
  
  
  
  
       
  </code></pre>