Java OOP SHORT
ANSWER QUESTIONS AGGREGATION SOLUTIONS
b) D) No
aggregation, since a byte is a simple variable. Note that a byte is the same as an int but
allows a smaller range of values. (You
do not need to know about bytes for the test.) E)
Aggregation, since we have five Ingredient objects. F) No
aggregation. c) Object types,
which are classes, should always start with a capital letter. d) First
constructor implementation: p2 = tp2; Second
constructor implementation: p1 = new Point(x1, y1); p2 = new Point(x2, y2); e) this.n = n; this.a = a; Second
constructor implementation n = new Name(f, m, l); a = new Address(n, s, t, p, pc); f1) { return province; } f2) return a; } f3) { return a.getPostalCode(); } |
|