/**
   * Function to remove components from the array of components.
   *
   * @param ToBeRemoved Component to be removed.
   */
  @Override
  public void removeComponent(Object[] ToBeRemoved) throws ObjectNotFoundInArrayException {
    components = ComponentsManagment.removeComponents(ToBeRemoved, components, componentCounter);

    // Sets the new count for number of components in the array
    componentCounter = components.length;
  }
  /**
   * Function to add component(s) to the the components list.
   *
   * @param NewComponents An array of new components.
   */
  @Override
  public void addComponents(Object[] NewComponents) {
    components = ComponentsManagment.addComponents(NewComponents, components, componentCounter);

    // Sets the new count for number of components in the array
    componentCounter = components.length;
  }
  /**
   * Function to add device(s) to the the connceted devices list.
   *
   * @param NewConnectedDevices An array of new devices.
   */
  @Override
  public void addConnectedDevices(Object[] NewConnectedDevices) {
    connectedDevices =
        ComponentsManagment.addComponents(
            NewConnectedDevices, connectedDevices, connectedDevicesCounter);

    // Sets the new count for number of connected devices in the array
    connectedDevicesCounter = connectedDevices.length;
  }
  /**
   * Function for replacing a spesific given connected device with a given new connected devices.
   *
   * @param NewconnectedDevice The connected device to replace the previous one.
   * @param OldconnectedDevice The connected device to be replaced.
   */
  @Override
  public void changeConnectedDevice(Object NewconnectedDevice, Object OldconnectedDevice) {
    components =
        ComponentsManagment.changeComponent(
            NewconnectedDevice, OldconnectedDevice, connectedDevices, connectedDevicesCounter);

    // Sets the new count for number of connected devices in the array
    connectedDevicesCounter = connectedDevices.length;
  }
  /**
   * Function for replacing a spesific given component with a given new component.
   *
   * @param NewComponent The component to replace the previous one.
   * @param OldComponent The component to be replaced.
   */
  @Override
  public void changeComponent(Object NewComponent, Object OldComponent) {
    components =
        ComponentsManagment.changeComponent(
            NewComponent, OldComponent, components, componentCounter);

    // Sets the new count for number of components in the array
    componentCounter = components.length;
  }