Answered step by step
Verified Expert Solution
Question
1 Approved Answer
looking for someone to tell me what I am doing wrong, got stuck 6. There is no method for removing a Concert Ticket from a
looking for someone to tell me what I am doing wrong, got stuck
6. There is no method for removing a Concert Ticket from a Wallet. Your job is to write a method named remove. It should take no parameters and return the Concert Ticket object that was removed. Here is the pseudocode for this method: public ConcertTicket remove () { // Create a ConcertTicket reference variable. // DO NOT create an object, only the reference variable. // Use the size variable to access the last added ConcertTicket // Point the reference variable to this object. // Set that array element to null // Decrement the size variable // return the concertTicket } 7. Write this method before moving on. public ConcertTicket remove() { ConcertTicket ct = new ConcertTicket(); ct = tickets [getSize() - 1); ct = null; this.size--; return ct; }Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started