Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I hope someone can help me with programming in java. Write a program SuperLotto

ID: 3618410 • Letter: I

Question

I hope someone can help me with programming in java. Write a program SuperLotto that asks the user for how manyLotto tickets he wants. For each Lotto ticket, generate 5 randomnumbers 1-47 using the Random class. Then generate a random meganumber 1-27 and place it last. Create a static mathodgetLottoTicket that creates and returns one Lotto ticket as aString. Use an array to hold the first 5 Lotto numbers. Sort thearray using the Arrays.sort method. Print each Lotto ticket. Usethe command prompt for input and output. I hope someone can help me with programming in java. Write a program SuperLotto that asks the user for how manyLotto tickets he wants. For each Lotto ticket, generate 5 randomnumbers 1-47 using the Random class. Then generate a random meganumber 1-27 and place it last. Create a static mathodgetLottoTicket that creates and returns one Lotto ticket as aString. Use an array to hold the first 5 Lotto numbers. Sort thearray using the Arrays.sort method. Print each Lotto ticket. Usethe command prompt for input and output. Write a program SuperLotto that asks the user for how manyLotto tickets he wants. For each Lotto ticket, generate 5 randomnumbers 1-47 using the Random class. Then generate a random meganumber 1-27 and place it last. Create a static mathodgetLottoTicket that creates and returns one Lotto ticket as aString. Use an array to hold the first 5 Lotto numbers. Sort thearray using the Arrays.sort method. Print each Lotto ticket. Usethe command prompt for input and output.

Explanation / Answer

import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Random; import java.util.Arrays; public class Main {     public static void main(String[] args)     {        System.out.println("Enter how many lotto tickets you wants: ");         BufferedReaderobjBufReader = new BufferedReader(newInputStreamReader(System.in));         int numTickets = 0;         try         {            numTickets = Integer.parseInt(objBufReader.readLine());            String[] strTicketNumbers= getLottoTicket(numTickets);            System.out.println("Your Looto Numbers : ");            for(int i=0;i