title: Simple UML Diagram...is this layout correct?
body: <p>I'm creating a UML diagram for the first time for an intro to Java course. I'm having trouble figuring out whether my classes are pointing to each other correctly. </p>
  
  <p>Is the Guitar class supposed to be pointing to the test class? Also, should the Guitar class be to the left of the test class? Any pointers are much appreciated, thanks. </p>
  
  <p><img src="https://i.stack.imgur.com/BMsKh.png" alt="enter image description here">
  <a href="http://img546.imageshack.us/img546/1446/e7o.png" rel="nofollow noreferrer">My UML diagram hosted on ImageShack</a>
  (I don't have enough ref points to insert the image)</p>
  
  <p>Code is below</p>
  
  <pre><code>package guitartest;
  
  import java.util.Scanner;
  
  public class Guitar {
  
  // Declare variables 
  private int numberOfStrings;
  private String stringName;
  private boolean isTuned;
  private boolean isPlaying;
  private boolean isPlucking;
  
  
  // Construct a guitar and set boolean fields to "false"
  public Guitar(){
      this.isTuned = false;
      this.isPlaying = false;
      this.isPlucking = false;
  }   // end constructor
  
  
  // Prompt user to enter number of strings 
  public int getNumberOfStrings() {
      Scanner sc = new Scanner(System.in);
  
      // Loop continues until a positive integer is entered
      do {
          System.out.println("Enter number of strings in integer format");
          while (!sc.hasNextInt()) {
              System.out.println("Error! That's not a number!");
              sc.next();
          }    // end while
          numberOfStrings = sc.nextInt();
       }    // end do-while loop
       while (numberOfStrings &lt;= 0); 
      return numberOfStrings;
  }   // end method getNumberOfStrings
  
  // Prompt user to enter string names
  public String getStringName() {
      Scanner sc = new Scanner(System.in);
  
      // Loop continues until all strings are named
      for (int i = 0; i &lt; numberOfStrings; i++){
          System.out.println("Enter string name"); 
          // Error if input is not a character
          while (!sc.hasNext("[A-Za-z]")) {
              System.out.println("Error! That's not a character!");
              sc.next();
           }
          stringName = sc.next();
      }   // end for loop
      return stringName;
  }   // end method getStringName
  
  // Verifies tuning status
  public boolean tuneInstrument(){
      return isTuned;
  }   // end method tuneInstrument
  
  // Tune guitar
  public void setTuned(boolean isTuned) {
      this.isTuned = isTuned;
  }   // end method setTuned
  
  // Verifies instrument is playing
  public boolean playInstrument(){
      return isPlaying;
  }   // end method playInstrument
  
  // 
  public void startPlayingInstrument(){
      isPlaying = true;
  }   // end method startPlayingInstrument
  
  public boolean pluckInstrument(){
      return isPlucking;
  }   // end method pluckInstrument
  
  public void startPlucking(){
      isPlucking = true;
  }   // end method startPlucking
  
  // Stop instrument
  public void stopInstrument(){
      isPlaying = false;
  }   // end method stopInstrument
  
  }   // end class Guitar
  </code></pre>
  
  <p>The test class follows:</p>
  
  <pre><code>package guitartest;
  
  import java.util.Scanner;
  // Scanner is in the java.util package
  
  public class GuitarTest {
  
  public static void main(String[] args) {
  
      // Create 10 guitar objects
      Guitar[] guitar = new Guitar[10];
  
      for (int i = 0; i &lt; guitar.length; i++){
          guitar[i] = new Guitar();
  
  
      // Call methods in Guitar class
      guitar[i].getNumberOfStrings(); 
      guitar[i].getStringName();
  
      System.out.println("Is the guitar tuned? " + guitar[i].tuneInstrument());
      System.out.println("Guitar is being tuned. Please wait...");
      guitar[i].setTuned(true);
      System.out.println("Is the guitar tuned? " + guitar[i].tuneInstrument());
  
      System.out.println("Is the guitar playing? " + guitar[i].playInstrument());
      System.out.println("Please wait for guitar to play...");
      guitar[i].startPlayingInstrument();
      System.out.println("Is the guitar playing? " + guitar[i].playInstrument());
  
      System.out.println("Is the guitar being plucked? " + guitar[i].pluckInstrument());
      System.out.println("Please wait for guitar to be plucked...");
      guitar[i].startPlucking();
      System.out.println("The guitar is playing and being plucked. " + guitar[i].pluckInstrument());
  
      System.out.println("Stopping guitar from playing...");
      guitar[i].stopInstrument();
      System.out.println("Is the guitar playing? " + guitar[i].playInstrument());
      }   // end for loop
  
  }   // end method main
  
  
  }   // end class GuitarTest
  </code></pre>