Difference between revisions of "PowersOf2Iterable"
Jump to navigation
Jump to search
| Line 21: | Line 21: | ||
==Correctness== | ==Correctness== | ||
{{TestSuite|PowersOfTwoTestSuite|powersoftwo.studio}} | {{TestSuite|PowersOfTwoTestSuite|powersoftwo.studio}} | ||
| + | |||
| + | =Pledge, Acknowledgments, Citations= | ||
| + | {{Pledge|studio-powers-of-two-iterable}} | ||
Revision as of 03:13, 21 January 2020
Contents
Motivation
Experience with implementing interfaces.
Investigate
interface Iterable<T>
interface Iterator<T>
Mistakes To Avoid
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 |
Pledge, Acknowledgments, Citations
| file: | studio-powers-of-two-iterable-pledge-acknowledgments-citations.txt |
More info about the Honor Pledge