title: Illegal expression in java code
body: <p>I am writing this code in Netbeans for a java class, but I am having a few errors and would really appreciate some help. The assignment is: </p>
  
  <blockquote>
    <p>Design and implement a stringed musical instrument class using the following guidelines:</p>
    
    <p>Data fields for your instrument should include number of strings, an array of string names representing string names (e.g. E,A,D,G), and boolean fields to determine if the instrument is tuned, and if the instrument is currently playing. You are welcome to add additional data fields if you like.</p>
    
    <p>A constructor method that set the tuned and currently playing fields to false.
    Other methods </p>
    
    <ol>
    <li>to tune the instrument </li>
    <li>to start the instrument playing, and  </li>
    <li>to stop the instrument from playing.
    Other methods as you see fit (Add at least one unique method).</li>
    </ol>
    
    <p>Create a UML class diagram using a diagram tool (e.g. PPT, Visio) of your choice.  Prepare the diagrams and place them in a word document along with a brief description of each of your classes.</p>
    
    <p>Create Java classes for your instruments. Be sure that your code matches your design specifications and some minimal functionality is included. For example, if you called the violin.play() method, you should at least print that the violin is playing. Similar functionality should be supplied when you stop playing, tune or call any of your methods. For example:</p>
  </blockquote>
  
  <pre><code> public void playviolin() {
       System.out.println("The violin is now playing.");
   }
  </code></pre>
  
  <blockquote>
    <p>Write the output from your Instrument class methods to a text file that a user entered from the command line arguments (e.g. java Mynamep3tst myfilename.txt). This allows your program to accept filenames from the user via a command line argument.</p>
    
    <p>Finally, create a Java test class that simulates using your instrument class.  In your test class be you should at a minimum: a) Construct 10 instances of your instrument, b) tune your instruments, c) Start playing your instrument, d) Call your unique method, and e) Stop playing your instruments.   (Hint: Arrays and Loops will make your job easier and result in more efficient code!)</p>
  </blockquote>
  
  <p>So here is my code currently:</p>
  
  <pre><code>package andrewrubinfinalproject;
  
  /**
   *
   * @author Andy
   */
  public class AndrewRubinFinalProject {
  
  
      public static void main(String[] args) {
  //fields to determine if the instrument is isTuned,
     private boolean isTuned;
  
     //and if the instrument is currently isPlaying.
     private boolean isPlaying;
  
  
     private String name;
  
     private int numberOfStrings = 4; // number of strings
     private String nameofStringsInInstrument[] = {"E", "C", "D", "A"}; //an array of string names
  
  
      //A constructor method that set the isTuned and currently isPlaying fields to false.
  
      public AndrewRubinFinalProject() {
          this.isTuned = false;
          this.isPlaying = false;
      }
  
  
  
      public String getNameOfInstrument() {
          return name;
      }
  
  
      public void setNameOfInstrument(String nameOfInstrument) {
          this.name = nameOfInstrument;
      }
  
  
      // Other methods
  
      public boolean isPlaying() {
          return isPlaying;
      }
  
      public void setPlaying(boolean playing) {
          this.isPlaying = playing;
      }
  
      public boolean isTuned() {
          return isTuned;
      }
  
      public void setTuned(boolean isTuned) {
          this.isTuned = isTuned;
      }
  
      public void startPlayInstrument() {
          System.out.println("The Instrument is now Playing.");
          isPlaying = true;
      }
  
      public void stopPlayInstrument() {
          System.out.println("The Instrument is not Playing anymore.");
          isPlaying = false;
      }
  
      public void startTuneInstrument() {
          System.out.println("The Instrument is Tuned.");
          isTuned = true;
      }
  
      public void stopTuneInstrument() {
          System.out.println("The Instrument is not Tuned.");
          isTuned = false;
      }  
  
      public int getNumberOfStrings() {
         return this.numberOfStrings ;
      }
  
      public String[] getStringNames() {
          return nameofStringsInInstrument;
      }
  
  }
  </code></pre>