[SOLVED] JAC444 Workshop 7-Functional Programming and Lambda Expressions in Java

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 07_Functional-Programming-and-Lambda-Expressions-in-Java-9oky1j.zip (484.8 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
5/5 - (2 votes)

This assignment lets you practice basic Functional Programming and Lambda Expressions in Java.

 

In this assignment, you will be adding some code to the workshop 3 (shapes) as follows:

Task 4: Define a functional interface to calculate the area of a shape. Create an object of that interface in each of the Circle, Square, Rectangle classes, using lambda expressions.

 

Print all the shapes and their perimeters polymorphically, as you did in task 1 (don’t forget that you are using just one Shape array) but in cases that the shape being printed is an object of these classes (i.e. Circle, Square, Rectangle), print their areas (using the above mentioned objects you created) as well.

 

  • 07_Functional-Programming-and-Lambda-Expressions-in-Java-9oky1j.zip