Difference between revisions of "Fork Loop Assignment"

From CSE231 Wiki
Jump to navigation Jump to search
(Created page with "=Motivation= There are many incantations of the fork_loop. We gain experience with selecting the right one for two scenarios. =Code To Use= ==FJ<E>== class [https://www.cse....")
 
Line 12: Line 12:
 
==SquareRoots==
 
==SquareRoots==
 
{{CodeToImplement|SquareRoots|toSquareRoots|forkloop.group}}
 
{{CodeToImplement|SquareRoots|toSquareRoots|forkloop.group}}
 +
===toSquareRoots===
 
{{Parallel|public static Double[] toSquareRoots(Double[] values)}}
 
{{Parallel|public static Double[] toSquareRoots(Double[] values)}}
 
+
===client===
 
{{CodeToInvestigate|SquareRootClient|main|forkloop.client|main}}
 
{{CodeToInvestigate|SquareRootClient|main|forkloop.client|main}}
  

Revision as of 04:52, 13 October 2022

Motivation

There are many incantations of the fork_loop. We gain experience with selecting the right one for two scenarios.

Code To Use

FJ<E>

class FJ<E>

join_fork_loop(returnValueComponentType, array, function)
join_fork_loop(iterable, function)

Code To Implement

SquareRoots

class: SquareRoots.java Java.png
methods: toSquareRoots
package: forkloop.group
source folder: student/src/main/java

toSquareRoots

method: public static Double[] toSquareRoots(Double[] values) Parallel.svg (parallel implementation required)

client

class: SquareRootClient.java DEMO: Java.png
methods: main
package: forkloop.client
source folder: src/main/java

Echoes

class: Echoes.java Java.png
methods: toEchoes
package: forkloop.group
source folder: student/src/main/java

method: public static List<String> toEchoes(List<String> texts) Parallel.svg (parallel implementation required)

class: EchoClient.java DEMO: Java.png
methods: main
package: forkloop.client
source folder: src/main/java

Testing

class: _ForkLoopTestSuite.java Junit.png
package: forkloop.group
source folder: testing/src/test/java