What should you do to calculate the tax amount for each order invoice in the Invoice DataTable object?

You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET. The application connects to a Microsoft SQL Server 2005 database.

The application uses a strongly typed DataTable class named Invoice to process order invoices.
The application contains third-party components and the Invoice DataTable class that cannot be recompiled.
The application processes the order invoices by passing the Invoice DataTable object to these third-party components.

You need to calculate the tax amount for each order invoice in the Invoice DataTable object.

What should you do?

You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET. The application connects to a Microsoft SQL Server 2005 database.

The application uses a strongly typed DataTable class named Invoice to process order invoices.
The application contains third-party components and the Invoice DataTable class that cannot be recompiled.
The application processes the order invoices by passing the Invoice DataTable object to these third-party components.

You need to calculate the tax amount for each order invoice in the Invoice DataTable object.

What should you do?

A.
+ Add a partial class named Invoice to the application.
+ Write a method to calculate the tax amount in the partial class.
+ Use the original Invoice typed DataTable object to process order invoices.

B.
+ Modify the generated source code for the Invoice typed DataTable object to contain a method that calculates the tax amount.
+ Update the application to use the new Invoice typed DataTable object to process order invoices.

C.
+ Create a class named TaxableInvoice that inherits from the Invoice class.
+ Write a method to calculate the tax amount in the TaxableInvoice class.
+ Update the application to use the TaxableInvoice typed DataTable object instead of the Invoice DataTable object to process order invoices.

D.
+ Create a utility class named InvoiceTaxCalculator for which the constructor takes an Invoice DataTable object.
+ Write a method to calculate the tax amount in the InvoiceTaxCalculator utility class.
+ Update the application to use the InvoiceTaxCalculator typed DataTable object instead of the Invoice DataTable object to process order invoices.



Leave a Reply 0

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