...
Code Block | ||
---|---|---|
| ||
if (age >= 18) { takevote(personID); } ... if (age <= 18) { checkSchoolEnrollment(personID); } |
Compliant
...
Solution
Code Block | ||
---|---|---|
| ||
if (age >= ADULT_AGE) { takevote(personID); } ... if (age <= ADULT_AGE) { checkSchoolEnrollment(personID); } |
...
Rule | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
EXP00-A | 1 (low) | 1(unlikely) | 2 (medium) | P2 | L3 |
References
Source: http://www.doc.ic.ac.uk/lab/cplus/c++.rules/chap10.html