[Solved] ITSE 2317 Program5 Lambdas and Streams

$25

File Name: ITSE_2317_Program5__Lambdas_and_Streams.zip
File Size: 367.38 KB

SKU: [Solved] ITSE 2317 Program5 – Lambdas and Streams Category: Tag:
5/5 - (1 vote)

Use the class, Invoice, provided to create an array of Invoice objects. Class Invoice includes four instance variables; partNumber (type String), partDescription (type String), quantity of the item being purchased (type int0, and pricePerItem (type double). Perform the following queries on the array of Invoice objects and display the results:

  1. Use streams to sort the Invoice objects by partDescription, then display the results.
  2. Use streams to sort the Invoice objects by pricePerItem, then display the results.
  3. Use streams to map each Invoice to its partDescription and quantity, sort the results by quantity, then display the results
  4. Use streams to map each Invoice to its partDescription and the value of the Invoice (i.e., quantity * pricePerItem). Order the results by Invoice value.
  5. Modify Part (d) to select the Invoice values in the range $200.00 to $500.00.
  6. Find any one Invoice in which the partDescription contains the word saw.

Use the data below to test your program.

Run your program and copy and paste the output to a file. Create a folder named, fullname_program5. Copy your source code and the output file to the folder. Zip the folder and upload it to Blackboard

Invoice Data

Part Number Part Description Quantity Price
83 Electric sander 7 57.98
24 Power saw 18 99.99
7 Sledge hammer 11 21.50
77 Hammer 76 11.99
39 Lawn mower 3 79.50
68 Screwdriver 106 6.99
56 Jig saw 21 11.00
3 Wrench 34 7.50

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] ITSE 2317 Program5  Lambdas and Streams[Solved] ITSE 2317 Program5 Lambdas and Streams
$25