Sol-Assignment04 - value field. This means every integer...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Solution Dung Nguyen Assignment: 04 Due Date: September 21, 2009 Exercise 3.4 private Instructor tutor; Exercise 3.7 If “>=” operator is replaced by “>”, the 0 value can’t be set using setValue method. Now, the left side of the logical AND will not be true when replacementValue == 0. Exercise 3.8 If “&&” operator is replaced by “||”, every value which is >=0 or < limit is legal to be set to
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: value field. This means every integer value is legal with setValue method whenever limit is &gt;= 0. Exercise 3.9 ! (4&lt;5) : false ! false : true (2 &gt; 2) || ((4 == 4) &amp;&amp; (1 &lt; 0)) : false (2 &gt; 2) || (4 == 4) &amp;&amp; (1 &lt; 0) : false (34 != 33) &amp;&amp; ! false : true Exercise 3.10 (a &amp;&amp; b) || (! a &amp;&amp; ! b) Exercise 3.18 Possible results of the expression (n % 5), where n is an integer, are 0, 1, 2, 3, 4...
View Full Document

Ask a homework question - tutors are online