0
I have a class Ticket
, that creates a ticket. and I have to do a class CustomerService
with a ArrayList
Ticket type, which I called tickets and places all tickets created in this Arraylist.
Constructor of the Ticket class:
public Ticket(char attendanceType, int ticketNumber)
{
this.arriveTime = LocalDateTime.now();
this.attendanceTime = null;
this.attendanceType = validateAttendanceType(attendanceType);
this.waitTime = 0;
this.ticketNumber = validateTicketNumber(ticketNumber);
}
Your question is how to instantiate the
ArrayList
? Or how to put the elements inside ? Has the methodadd
ofArrayList
to add elements.– Isac
He wants to know how to get the Arraylist of the other class, as far as I know.
– Gustavo Cinque
Put the elements in this Ticket case, in the arraylist in the Customerservice class,
– Miguel
ex: person creates 1,2,3,4... tickets, ticket1,ticket2.. , and the program that starts the Customerservice class, puts all these tickets in the arrayList tickets
– Miguel
I think my answer will help you, @Miguel.
– Gustavo Cinque