A theater needs a TicketCounter to keep track of the number of tickets sold.There are two types of ticket: regular and discount.Which technique would be the best approach to printing the number of tickets sold?
A) Create a toString() method in the class that creates a representation with the number of discount and regular priced tickets sold.
B) Create a print() method that will print out the number of discount and regular priced tickets sold.
C) Make the instance variables public so programs can access the values and print them.
D) Create a getValues(int regular, int discount) method that will return the number of discount and regular priced tickets sold.
Correct Answer:
Verified
Q72: A new class is proposed to collect
Q73: Consider the Checker class below.
Q74: Under which of the following conditions must
Q75: A new class is proposed to collect
Q76: To use a public variable or method
Q78: If you do not include a package
Q79: Which of the following names would be
Q80: Which action is not accomplished by using
Q81: Which annotation is used to mark test
Q82: Consider the partial class below:
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents