Starting from:

$29.99

JAC444 Workshop 7 Solution

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

In this assignment, you will be adding some code to 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 abovementioned objects you created) as well.


Marking Criteria and Tasks:
Please note that you should:
a- have an appropriate indentation.
b- have proper file structures and modularization. c- follow Java naming conventions. d- document all the classes properly. e- not have debug/useless code and/or file(s) left in assignment.
f- have good intra and/or inter-class designs.
in your code!

• Task: Developing and running the desired solution: (you should submit your source code - just individual .java files, and screenshots that demonstrate the way your code runs): 5 marks.

Deliverables and Important Notes:

• Please note that you would be allowed to submit just once, so please be super careful and double-check before you hit submit.

• There would be a 20% penalty for each day (or part of it,) in case you submit late!


More products