Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given the following class code that you should assume will correctly execute ( ignore any minor syntax errors ) : class Ticket ( object )

Given the following class code that you should assume will correctly execute (ignore any minor syntax errors):
class Ticket (object):
ticketCount =0
def_init_(self, name, event):
self.serialNumber = Ticket.ticketCount
Ticket.ticketCount +=1
self.cust_name = name
self.event = event
def_str_(self):
return ('Tick#'+ str(self.serialNumber)+'-'+ self.cust_name +'-'+ self.event)
def equalTick (self, t_obj):
if self ==t?obj:
return True, 'dupe ticket'
if not isinstance (t_obj, Ticket):
retum False, 'Object not type Ticket'
return (str(self.serialNumber)== str(t_obj.serialNumber) and
str(self.event)= str(t_obj.event), 'comparison done' )
# global code
t1= Ticket ('K. Ball', 'GMU Basketball')
t2= Ticket ('Tom Brady', 'Pats Game')
t3= Ticket ('Gene Shuman', 'Nats Game')
t4= Ticket ('E. Musk', 'SpaceX Launch')
t5= Ticket ('K. Ball', 'GMU Basketball')
t6= Ticket ('A. Trebek', 'Jeopardy Audience')
What is the display output of
t1=t5,?
K. Ball, GMU Basketball
Tick#5- K. Ball - GMU Basketball
True
False
None of the listed answers is correct
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Explain the process of MBO

Answered: 1 week ago