[SOLVED] CSC221 Homework6-Lambdas and Streams

35.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon HW-6-f4cmmj.zip (524.5 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
πŸ”’ Securely Powered by:
Secure Checkout
Rate this product

This assignment focuses on Java’s Lambdas and Streams discussed in Chapter 17 and generic classes discussed in Chapter 20. You will need to implement the four methods declared in the provided Java file.

For Β Β Β  this Β Β Β  assignment, Β Β Β  you Β Β Β  must Β Β  use Β Β Β  Java’s Β Β Β  streams Β Β Β  with Β Β  intermediate Β Β Β  and Β Β Β  terminal Β Β  operations Β Β Β Β Β Β Β Β Β Β  (e.g.

π‘“π‘–π‘™π‘‘π‘’π‘Ÿ, π‘šπ‘Žπ‘, π‘™π‘–π‘šπ‘–π‘‘, π‘ π‘’π‘š …). You are not allowed to use any looping structures (i.e. For, While, and Do‐While). For file input, you must use the π‘—π‘Žπ‘£π‘Ž. π‘›π‘–π‘œ package and not the π‘—π‘Žπ‘£π‘Ž. π‘–π‘œ package. However, you may use any of the exception classes from π‘—π‘Žπ‘£π‘Ž. π‘–π‘œ since there aren’t any in π‘—π‘Žπ‘£π‘Ž. π‘–π‘œ!

Consult each method’s Javadoc for a description of that method’s task.

Note:

  • This is an individual assignment; please do your own work, sharing and/or copying code and/or solution ideas with/from others will result in a grade of 0 and disciplinary actions for all involved parties. If you run into problems and have done your best to solve them, please contact me before/after class or by e-mail.
  • A 20% grade deduction for every day the assignment is late.

Figures:

  1. 𝑇𝑒𝑠𝑑𝑖𝑛𝑔 π‘‘π‘œπ‘„π‘’π‘’π‘’π‘’ 𝑒𝑠𝑖𝑛𝑔 π‘Žπ‘› π‘’π‘šπ‘π‘‘π‘¦ π‘ π‘‘π‘Žπ‘π‘˜. π‘‰π‘Žπ‘™π‘’π‘’π‘ :

 

  1. 𝑇𝑒𝑠𝑑𝑖𝑛𝑔 π‘‘π‘œπ‘„π‘’π‘’π‘’π‘’ 𝑒𝑠𝑖𝑛𝑔 π‘ π‘‘π‘Žπ‘π‘˜πΆβ„Žπ‘Žπ‘Ÿ. π‘‰π‘Žπ‘™π‘’π‘’π‘ : π΄π΅πΆπ·πΈπΉπΊπ»πΌπ½πΎπΏπ‘€π‘π‘‚π‘ƒπ‘„π‘…π‘†π‘‡π‘ˆπ‘‰π‘Šπ‘‹π‘Œπ‘

 

  1. 𝑇𝑒𝑠𝑑𝑖𝑛𝑔 π‘Ÿπ‘’π‘£π‘’π‘Ÿπ‘ π‘’π‘†π‘‘π‘Žπ‘π‘˜ 𝑒𝑠𝑖𝑛𝑔 π‘ π‘‘π‘Žπ‘π‘˜πΆβ„Žπ‘Žπ‘Ÿ. π‘‰π‘Žπ‘™π‘’π‘’π‘ : π‘π‘Œπ‘‹π‘Šπ‘‰π‘ˆπ‘‡π‘†π‘…π‘„π‘ƒπ‘‚π‘π‘€πΏπΎπ½πΌπ»πΊπΉπΈπ·πΆπ΅π΄

 

  1. 𝑇𝑒𝑠𝑑𝑖𝑛𝑔 π‘ π‘’π‘šπ΅π‘’π‘‘π‘€π‘’π‘’π‘› 𝑒𝑠𝑖𝑛𝑔 π‘ π‘‘π‘Žπ‘π‘˜πΌπ‘›π‘‘. π‘†π‘’π‘š 𝑏𝑒𝑑𝑀𝑒𝑒𝑛 2 π‘Žπ‘›π‘‘ 0: 1

 

  1. 𝑇𝑒𝑠𝑑𝑖𝑛𝑔 π‘ π‘’π‘šπ΅π‘’π‘‘π‘€π‘’π‘’π‘› 𝑒𝑠𝑖𝑛𝑔 π‘ π‘‘π‘Žπ‘π‘˜πΌπ‘›π‘‘. π‘†π‘’π‘š 𝑏𝑒𝑑𝑀𝑒𝑒𝑛 10 π‘Žπ‘›π‘‘ 20: 605

 

  1. 𝑇𝑒𝑠𝑑𝑖𝑛𝑔 π‘ π‘’π‘šπ΅π‘’π‘‘π‘€π‘’π‘’π‘› 𝑒𝑠𝑖𝑛𝑔 π‘ π‘‘π‘Žπ‘π‘˜πΌπ‘›π‘‘. π‘†π‘’π‘š 𝑏𝑒𝑑𝑀𝑒𝑒𝑛 1000 π‘Žπ‘›π‘‘ 2000: 1

 

  1. 𝑇𝑒𝑠𝑑𝑖𝑛𝑔 π‘Ÿπ‘’π‘Žπ‘‘π‘π‘’π‘šπ‘’π‘Ÿπ‘–π‘πΉπ‘Ÿπ‘œπ‘šπΉπ‘–π‘™π‘’. 1𝑠𝑑 10 π‘π‘’π‘šπ‘’π‘Ÿπ‘–π‘ π‘β„Žπ‘Žπ‘Ÿπ‘Žπ‘π‘‘π‘’π‘Ÿπ‘  π‘“π‘œπ‘’π‘›π‘‘: 7, 4, 6, 9, 6, 8, 6, 1, 3, 2

Figure 1: Test script output

Β 

  • HW-6-f4cmmj.zip