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:
- Use streams to sort the Invoice objects by partDescription, then display the results.
- Use streams to sort the Invoice objects by pricePerItem, then display the results.
- Use streams to map each Invoice to its partDescription and quantity, sort the results by quantity, then display the results
- 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.
- Modify Part (d) to select the Invoice values in the range $200.00 to $500.00.
- 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 |

![[Solved] ITSE 2317 Program5 Lambdas and Streams](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip.jpg)

![[Solved] ITSE 2317 Program 2 TwoDimensionalShape](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip-1200x1200.jpg)
Reviews
There are no reviews yet.