PrepAway - Latest Free Exam Questions & Answers

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?

PrepAway - Latest Free Exam Questions & Answers

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