Which of the following support this functionality?

Refer to the exhibit to answer the question.

When tickets are sold to a customer, a SalesTransaction is created. This transaction can be
suspended or cancelled. Which of the following support this functionality?

Refer to the exhibit to answer the question.

When tickets are sold to a customer, a SalesTransaction is created. This transaction can be
suspended or cancelled. Which of the following support this functionality?

A.
Have the SalesTransaction held by another object in a context that defines its state, such as a
TicketBooth’s
suspendedTransactions attribute.

B.
Create SuspendedTransaction and CancelledTransaction subclasses of SalesTransaction.

C.
Have the SalesTransaction hold its state as suspended or cancelled.

D.
Throw away the SalesTransaction instance and create a new one when needed.

E.
Create SuspendedTransaction and CancelledTransaction classes.



Leave a Reply 0

Your email address will not be published. Required fields are marked *