Answered step by step
Verified Expert Solution
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!
``````````````````````````````````````````````````````````````````````````
- Create an Invoice class with 4 attributes: PartNumber (type int), PartDescription (type String), Quantity (type int), and Price (type double).
- Create a constructor that allows you to initialize all 4 attributes from values passed in as parameters.
- Override the toString() method to display all 4 attributes in a format of your choosing.
- Create a List of 10 Invoices containing data of your choosing.
- Use lambdas and streams to perform the following queries on the list of Invoice objects and display the results:
- Sort the Invoice objects by PartDescription, then display the results.
- Sort the Invoice objects by Price, then display the results.
- Map each Invoice to its PartDescription and Quantity, sort the results by Quantity, then display the results.
- 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) 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started