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

Write, document (internally) and test a Java program to do the following: A char

ID: 3684331 • Letter: W

Question

Write, document (internally) and test a Java program to do the following:

A charitable organization is selling tickets on three prizes:

First Prize - $1000
Second Prize - $500
Third Prize - $250


For each ticket sold, the following information is recorded:

ticket number (1-1000, inclusive)

buyer's name

buyer's telephone number

Define a class Ticket to represent this information.

Create a singly-linked list of Ticket objects. The information for each ticket is to be input. Output the contents of the list and the number of tickets that were sold.

Select the winner for each prize by generating three random numbers between 1 and the number of tickets sold, inclusive. Search the list for each winning number generated, output the name and telephone number of the winner (properly labelled with the prize that she/he won), and remove that ticket from the list.

Output the contents of the list after the three winners have been selected.

Explanation / Answer

Hi below i have written the sample function for your reference,