[SOLVED] Product listing and sorting program in Java with full source code

(Manipulating a Stream<Invoice )

  • Use the class Invoice to create a List of Invoice objects.
  • Use the sample data shown in the Fig.
  • Class Invoice includes four properties
  • PartNumber (type int ),
  • PartDescription (type String ),
  • Quantity of the item being purchased (type int ) and
  • Price (type double ).
  • Perform the following queries on the List of Invoice objects and display the results:
  • Use lambdas and streams to sort the Invoice objects by PartDescription , then display the results.
  • Use lambdas and streams to sort the Invoice objects by Price , then display the results.
  • Use lambdas and streams to map each Invoice to its PartDescription and Quantity , sort the results by Quantity , then display the results.
  • Use lambdas and streams to map each Invoice to its PartDescription and the value of the Invoice (i.e., Quantity * Price ). Order the results by Invoice value.
  • Modify Part (d) to select the Invoice values in the range $200 to $500.

Get your solution now 

Buy now

Comments

Popular posts from this blog

[SOLVED] Tape for a Turing Machine using Doubly-linked List in Java with full source code

[SOLVED] ICT285 Databases TMA 2017 Assignment 1 | Relational Algebra, Database Design & Implementation