class LotteryAdministration {

  private final LotteryTicketRepository repository;
  private final LotteryEventLog notifications;
  private final WireTransfers wireTransfers;

  /**
   * Constructor.
   */
  @Inject
  public LotteryAdministration(LotteryTicketRepository repository, LotteryEventLog notifications,
                               WireTransfers wireTransfers) {
    this.repository = repository;
    this.notifications = notifications;
    this.wireTransfers = wireTransfers;
  }

  /**
   * Get all the lottery tickets submitted for lottery.
   */
  public Map<LotteryTicketId, LotteryTicket> getAllSubmittedTickets() {
    return repository.findAll();
  }

  /**
   * Draw lottery numbers.
   */
  public LotteryNumbers performLottery() {<FILL_FUNCTION_BODY>}

  /**
   * Begin new lottery round.
   */
  public void resetLottery() {
    repository.deleteAll();
  }
}

    var numbers = LotteryNumbers.createRandom();
    var tickets = getAllSubmittedTickets();
    for (var id : tickets.keySet()) {
      var lotteryTicket = tickets.get(id);
      var playerDetails = lotteryTicket.getPlayerDetails();
      var playerAccount = playerDetails.getBankAccount();
      var result = LotteryUtils.checkTicketForPrize(repository, id, numbers).getResult();
      if (result == LotteryTicketCheckResult.CheckResult.WIN_PRIZE) {
        if (wireTransfers.transferFunds(PRIZE_AMOUNT, SERVICE_BANK_ACCOUNT, playerAccount)) {
          notifications.ticketWon(playerDetails, PRIZE_AMOUNT);
        } else {
          notifications.prizeError(playerDetails, PRIZE_AMOUNT);
        }
      } else if (result == LotteryTicketCheckResult.CheckResult.NO_PRIZE) {
        notifications.ticketDidNotWin(playerDetails);
      }
    }
    return numbers;
  
<no_super_class>