Assignment 3, due Feb 3
Part of
the homework for CS:2820, Spring 2017
|
On every assignment, write your name and section number. Write your name as it appears on your university ID card! Use the section number as it appears in your current registration! We will not do detective work to figure out who did what. Homework is due on paper at the start of your discussion section. Exceptions will be made only by advance arrangement with your TA (excepting "acts of God"). Never push homework under someone's door!
a) What feature of the a&&b makes it classify as a control structure? (0.3 points)
b) Rewrite this as 2 nested if statements. (0.4 points)
c) What should be the type of the return value of the method x? (0.3 points)
As in the previous assignment, legible handwritten code is sufficient, but you can be more assured that it works if you try it on a computer. (1 point)
a) Give Java code that captures all of the attributes of a ternary logic gate No methods are required, just the data attributes. (0.5 points)
b) Give Java code that captures all of the attributes of an wire between logic gates. Again, no methods are required, just the data attributes. (0.5 points)