class Dispatcher {

  private static Dispatcher instance = new Dispatcher();

  private final List<Store> stores = new LinkedList<>();

  private Dispatcher() {
  }

  public static Dispatcher getInstance() {
    return instance;
  }

  public void registerStore(Store store) {
    stores.add(store);
  }

  /**
   * Menu item selected handler.
   */
  public void menuItemSelected(MenuItem menuItem) {<FILL_FUNCTION_BODY>}

  private void dispatchAction(Action action) {
    stores.forEach(store -> store.onAction(action));
  }
}

    dispatchAction(new MenuAction(menuItem));
    if (menuItem == MenuItem.COMPANY) {
      dispatchAction(new ContentAction(Content.COMPANY));
    } else {
      dispatchAction(new ContentAction(Content.PRODUCTS));
    }
  
<no_super_class>