Solved

Suppose That the Invoice-Printing Application from Section 12

Question 14

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:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions