Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone please help me with this. I am stuck. I need this composed in Netbeans IDE 8.0.2 or an older JAVA version. I cannot

Can someone please help me with this. I am stuck. I need this composed in Netbeans IDE 8.0.2 or an older JAVA version. I cannot use the newer Netbeans. The code I composed will not run properly in my older version of Netbeans. Please show output and follow instructions below to help me along the way with assignment. Points will be given. CHEERS!

``````````````````````````````````````````````````````````````````````````

  1. Create an Invoice class with 4 attributes: PartNumber (type int), PartDescription (type String), Quantity (type int), and Price (type double).
  2. Create a constructor that allows you to initialize all 4 attributes from values passed in as parameters.
  3. Override the toString() method to display all 4 attributes in a format of your choosing.
  4. Create a List of 10 Invoices containing data of your choosing.
  5. Use lambdas and streams to perform the following queries on the list of Invoice objects and display the results:
    1. Sort the Invoice objects by PartDescription, then display the results.
    2. Sort the Invoice objects by Price, then display the results.
    3. Map each Invoice to its PartDescription and Quantity, sort the results by Quantity, then display the results.
    4. Map each Invoice to its PartDescription and the value of the Invoice (i.e., Quantity * Price). Order the results by Invoice value.
    5. Modify Part (d) above to select the Invoice values in the range of $200 to $500 (inclusive) and display the results separately.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Access Patterns Database Interactions In Object Oriented Applications

Authors: Clifton Nock

1st Edition

0321555627, 978-0321555625

More Books

Students also viewed these Databases questions

Question

What functions might this behavior be serving?

Answered: 1 week ago