JAVA ECLIPSE Code from scratch. Submission is the usual: zip of completed project, plus screen shot(s) of test run(s)
HW11-1: Lambda Review Problem(s) Student instances include a name and String “major” field (e.g., “CS”) . The Dean of CSM at Rowan would like to add a special designator called numericIndicator of type int. class Student has an accessor and a setter method setNumericIndicator(int n). This is an exercise to self-test to see if you can do OOPDAlevel work to define a class and use concepts relating mainly to lambda expressions. Deliverable: Attach zip of a completed Eclipse project to test all this, plus a Word document with screen shots of testing and comments. The Dean has expressly asked that the value be generated mathematically, as a sum of two integers, to be handled as a Lambda Expression. Students will be assigned the sum of two numbers, such as two and three, which is computed as: answer = 2 + 3; 1. Write a Lambda expression using a standard functional interface called calcIndicator that will take two numbers and add them to return a sum. 2. Given a single Student object called student1, show how this method would be used to update the instance with a new value. 3. If we have an ArrayList of called studentList, can you write code to unconditionally change the indicator value of every instance in the collection using the lambda handling described above, in a pipeline?? [When I tested this, I took the liberty of generating random values 0 to 9 for each argument. Major codes were also generated randomly] • Use some form of a stream operation to do this • Write a Predicate cs to determine if the student has a major of “CS” • Use a stream and apply the lambda to CS students only, using your predicate in the stream, so only CS students will have a non-zero indicator. My sample output: OOPDA HW11A-1 Lambda Review revSP22 Setting Random values with CS filter Updated values: -Mike, major: CS = 7 -Sarah, major: CS = 9 -Jennifer, major: Math = 0 -Sam, major: Math = 0 -Tom, major: Engr = 0 -Eli, major: AstroPhysics = 0 p. 1 3/26/2022 10:55 AM
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.