Assignment 2 (Functions and Testing)
Coding Bat
Do these five exercises from Coding Bat Warmup 1.
Choose two of the above Coding Bat exercises to do a full
implementation with unit tests on your own. Your class should include
the function, a testing function, and multiple tests in main()
.
Example: MonkeyTrouble
Coding Exercises
Coding Exercises Ch 1 (#3 challenge is optional).
The Unit 2 Quiz will consist of exercises similar to these exercises. You will be asked to write code for the specified function only (no unit tests on the quizzes).
Reading
- Eck Section 3.1 Blocks, Loops, and Branches (http://math.hws.edu/javanotes/c3/s1.html)
- Eck Section 3.5 The
if
statement (http://math.hws.edu/javanotes/c3/s1.html#control.1.3) - Supplemental: Wikibooks Java (Statements, Conditional blocks, Loop blocks, Boolean expressions) https://en.wikibooks.org/wiki/Java_Programming