Usetheclass invoiceprovidedintheex0903 folder with this


Usetheclass Invoiceprovidedintheex09_03 folder with this chapter's examples to create an array of Invoice objects. Use the sample data shown in Fig. 9.8.Class Invoice includesfourproperties-a PartNumber (type int),a PartDescription (type string), a Quantity of the item being purchased (type int) and a Price (type decimal). Perform the following queries on the array of Invoice objects and display the results:

a) Use LINQ to sort the Invoice objects by PartDescription.

b) Use LINQ to sort the Invoice objects by Price.

c) Use LINQtoselect the PartDescription and Quantity and sort theresultsby Quantity.

d) Use LINQ to select from each Invoice the PartDescription and the value of the Invoice (i.e., Quantity * Price). Name the calculated column InvoiceTotal. Order the resultsby Invoice value.[Hint:Use let tostoretheresultof Quantity * Price inanew range variable total.]

e) Using the results of the LINQ query in Part d, select theInvoiceTotals in the range $200 to $500.Part number Part description Quantity Price83 Electric sander 7 57.9824 Power saw 18 99.997 Sledge hammer 11 21.5077 Hammer 76 11.9939 Lawn mower 3 79.5068 Screwdriver 106 6.9956 Jig saw 21 11.003 Wrench 34 7.50

Request for Solution File

Ask an Expert for Answer!!
Science: Usetheclass invoiceprovidedintheex0903 folder with this
Reference No:- TGS01388426

Expected delivery within 24 Hours