Big Powers of 2 Assignment
Jump to navigation
Jump to search
Contents
Motivation
Prepare to use BigInteger in the Fibonacci exercise.
BigInteger Docs
When integers git too big to be stored in an int or a long, we use BigInteger.
Group Warmup
BigPowerOfTwoUtils
| class: | BigPowerOfTwoUtils.java | |
| methods: | powerOf2 | |
| package: | bigpoweroftwo.group | |
| source folder: | student/src/main/java |
method: public static BigInteger powerOf2(int n)
(sequential implementation only)
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle 2^n}
Client
| class: | BigPowerOfTwoClient.java | |
| package: | bigpoweroftwo.client | |
| source folder: | src/main/java |
Testing Your Solution
| class: | _BigPowerOfTwoTestSuite.java | |
| package: | bigpoweroftwo.group | |
| source folder: | testing/src/test/java |