Difference between revisions of "PowersOf2Iterable"
Jump to navigation
Jump to search
(Created page with "=Motivation= Experience with implementing interfaces. =Mistakes To Avoid= {{warning | Do NOT Parallelize}} =Code to Implement= {{CodeToImplement|PowersOfTwoLessThan|construc...") |
|||
Line 10: | Line 10: | ||
==constructor== | ==constructor== | ||
{{Sequential|public PowersOfTwoLessThan(int maxExclusive)}} | {{Sequential|public PowersOfTwoLessThan(int maxExclusive)}} | ||
+ | |||
==iterator== | ==iterator== | ||
{{Sequential|public Iterator<Integer> iterator()}} | {{Sequential|public Iterator<Integer> iterator()}} |
Revision as of 04:14, 18 January 2020
Contents
Motivation
Experience with implementing interfaces.
Mistakes To Avoid
Warning: Do NOT Parallelize |
Code to Implement
class: | PowersOfTwoLessThan.java | |
methods: | constructor iterator |
|
package: | slices.studio | |
source folder: | student/src/main/java |
constructor
method: public PowersOfTwoLessThan(int maxExclusive)
(sequential implementation only)
iterator
method: public Iterator<Integer> iterator()
(sequential implementation only)
Testing Your Solution
Correctness
class: | PowersOfTwoTestSuite.java | |
package: | powersoftwo.studio | |
source folder: | testing/src/test/java |