class ApplicationServicesImpl implements ApplicationServices {

  private DomainServicesImpl domain = new DomainServicesImpl();

  @Override
  public ReceiptViewModel loggedInUserPurchase(String userName, String itemName) {<FILL_FUNCTION_BODY>}

  private boolean isDownForMaintenance() {
    return MaintenanceLock.getInstance().isLock();
  }
}

    if (isDownForMaintenance()) {
      return new DownForMaintenance();
    }
    return this.domain.purchase(userName, itemName);
  
<no_super_class>