class GameObject {
  private final InputComponent inputComponent;
  private final PhysicComponent physicComponent;
  private final GraphicComponent graphicComponent;

  private final String name;
  private int velocity = 0;
  private int coordinate = 0;

  /**
   * Creates a player game object.
   *
   * @return player object
   */
  public static GameObject createPlayer() {<FILL_FUNCTION_BODY>}


  /**
   * Creates a NPC game object.
   *
   * @return npc object
   */
  public static GameObject createNpc() {
    return new GameObject(
            new DemoInputComponent(),
        new ObjectPhysicComponent(),
        new ObjectGraphicComponent(),
        "npc");
  }

  /**
   * Updates the three components of the NPC object used in the demo in App.java
   * note that this is simply a duplicate of update() without the key event for
   * demonstration purposes.
   *
   * <p>This method is usually used in games if the player becomes inactive.
   */
  public void demoUpdate() {
    inputComponent.update(this, 0);
    physicComponent.update(this);
    graphicComponent.update(this);
  }

  /**
   * Updates the three components for objects based on key events.
   *
   * @param e key event from the player.
   */
  public void update(int e) {
    inputComponent.update(this, e);
    physicComponent.update(this);
    graphicComponent.update(this);
  }

  /**
   * Update the velocity based on the acceleration of the GameObject.
   *
   * @param acceleration the acceleration of the GameObject
   */
  public void updateVelocity(int acceleration) {
    this.velocity += acceleration;
  }


  /**
   * Set the c based on the current velocity.
   */
  public void updateCoordinate() {
    this.coordinate += this.velocity;
  }
}

    return new GameObject(new PlayerInputComponent(),
        new ObjectPhysicComponent(),
        new ObjectGraphicComponent(),
        "player");
  
<no_super_class>