Multiple Choice
Suppose that the invoice-printing application from section 12.3 needs to be enhanced by making it possible for class InvoicePrinter to store several invoices to be printed. Select the code segment that best illustrates reuse of the existing Invoice class for this purpose. public class InvoicePrinter ___________________________
A) extends Invoice
{
…
}
B) {
Public static void main(String[] args)
{
Invoice invoice1;
Invoice invoice2;
…
}
C) implements Invoice
{
…
}
D) {
Public static void main(String[] args)
{
ArrayList<Invoice> invoices;
…
}
}
Correct Answer:

Verified
Correct Answer:
Verified
Q9: You are designing an application to support
Q10: Given the following diagram showing class relationships:
Q13: Suppose you are developing a payroll application
Q18: Given the following diagram showing class relationships:
Q19: Consider the following code snippet: public class
Q22: After you have identified a set of
Q30: _ is often described as the is-a
Q47: Which of the following would be an
Q69: A Quiz class contains an array of
Q72: Dependency between classes denotes that _.<br>A)Objects of