THREE NON EXCEPTIONAL PATHS?
- if (e.Title() == “CEO” || e.Salary() > 10000)
if e.Title() == “CEO” is true then the second part is not evaluated and e.Salary() will not be called.
cout will be performed - if e.Title() != “CEO” and e.Salary() > 10000
both parts of the condition will be evaluated
cout will be performed. - if e.Title() != “CEO” and e.Salary() <= 10000
both parts of the condition will be evaluated
cout will not be performed.
THREE NON EXCEPTIONAL PATHS?
Reviewed by MCH
on
July 17, 2012
Rating:
No comments: