title: Converting a UML Diagram into Code
body: <p>I am having issues converting this UML Diagram setup into code. I understand the Class is the top portion followed by the variables and the methods. I am very new to Java and this is probably the most confusing thing I've ever encountered. I'm not 100% sure how to create the "model" or the main code section for this but this is the code I have started/attempted for the Domain class so far. Am I on the right track? Or am I just completely lost. Any tips, or something to send me in the right direction would be greatly appreciated.</p>
  
  <p><a href="https://i.stack.imgur.com/UexRT.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UexRT.jpg" alt="enter image description here"></a></p>
  
  <pre><code>  //This is the main .java file
    public class Assignment3 extends Application {
  
  
  
  @Override
  public void start(Stage stage) throws Exception {
      Group root = new Group();
      Scene scene = new Scene(root);
      Canvas canvas = new Canvas(400, 300); // Set canvas Size in Pixels
      stage.setTitle("FXGraphicsTemplate"); // Set window title
      root.getChildren().add(canvas);
      stage.setScene(scene);
      GraphicsContext gc = canvas.getGraphicsContext2D();
  
      Castle stateDomain = new Castle();
      Castle drawDomain = new Castle();
  
      stage.show();
      }
  
  
   public static void main (String[] args) {
       launch ( args );
   }
  
   // .class file that is utterly awful and I don't know where to go
  
   public class Castle {
  
  
   private String castleName;
   private double castleSize;
   private double castleX;
   private double castleY;
   private int domainX;
   private int domainY;
   private String castleColor;
   private String domainName;
  
  
  
  public void stateDomain ( String castleName, int domainX, int domainY, String castleColor ) {
      this.castleName = castleName;
      this.domainX = domainX;
      this.domainY = domainY;
      this.castleColor = castleColor;    
  }
  
  public void drawDomain ( GraphicsContext gc ) {
  
  
  
  }
  </code></pre>
  
  <p>I want to point out I am just looking for some direction. Anything at this point would be incredibly helpful, whether it's a link to another post or a sliver of code that gets my brain going. 
  Thank you.</p>