bool badData; ... badData = (0.0 == height);
bool badData;
if (0.0 == height) {
badData = true;
} else {
badData = false;
}
| Case | Input Values | Expected Output | Observed Output | |
|---|---|---|---|---|
| Misspelled Name | mars, Mxrs | New Weight: unknown | ||
| Correct Name | Check for each planet, weight = 100 | New Weight: xx.xxxx, check against table | ||
| Floating point round off | Earth, weight 1.23456 | New Weight: 1.2346 |