Java Reference
In-Depth Information
e. "Harry", "hairy"
f. "C++", "Car"
g. "Tom", "Tom"
h. "Car", "Carl"
i. "car", "bar"
j. "101", "11"
k. "1.01", "10.1"
΢
Exercise R5.6. Complete the following truth table by finding the truth
values of the Boolean expressions for all combinations of the Boolean
inputs p , q , and r .
p
q
r
(p && q) || !r !(p && (q || !
r))
false
false
false
false
false
true
false
true
false
Ȟ
5 more combinations
Ȟ
218
219
΢
Exercise R5.7. Before you implement any complex algorithm, it is a good
idea to understand and analyze it. The purpose of this exercise is to gain a
better understanding of the tax computation algorithm of Section 5.3.2 .
One feature of the tax code is the marriage penalty. Under certain
circumstances, a married couple pays higher taxes than the sum of what the
two partners would pay if they both were single. Find examples for such
income levels.
΢΢΢ Exercise R5.8. True or false? A && B is the same as B &&A for any
Boolean conditions A and B.
΢
Exercise R5.9. Explain the difference between
s = 0;
 
Search WWH ::




Custom Search