Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
bgColor#ffcccc
if (age >= 18) {
  takevote(personID);
}
... 
if (age <= 18) {
  checkSchoolEnrollment(personID);
}

Compliant

...

Solution

Code Block
bgColor#ccccff
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