final-sample-1-key

final-sample-1-key - CSE 143 Sample Final Exam #1 Key 1....

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CSE 143 Sample Final Exam #1 Key 1. Statement Output var1.method2(); var2.method2(); var3.method2(); var4.method2(); var5.method2(); var6.method2(); var1.method3(); var2.method3(); var3.method3(); var4.method3(); ((Cup) var1).method1(); ((Jar) var2).method1(); ((Cup) var3).method1(); ((Cup) var4).method1(); ((Jar) var4).method2(); ((Box) var5).method2(); ((Pill) var5).method3(); ((Jar) var2).method3(); ((Cup) var3).method3(); ((Cup) var5).method3(); Box 2 Jar 2 Cup 2/Box 2 Jar 2 error Pill 2 Box 2/Box 3 error Cup 2/Box 2/Box 3 Jar 2/Box 3 error Jar 1 Cup 1 error Jar 2 Box 2 error Jar 2/Box 3 Cup 2/Box 2/Box 3 error 2. public class Point3D extends Point implements Comparable<Point3D> { private int z; public Point3D() { this(0, 0, 0); } public Point3D(int x, int y, int z) { // super(x, y); // this.z = z; setLocation(x, y, z); } public int getZ() { return z; } public String toString() { return "(" + getX() + ", " + getY() + ", " + z + ")"; } public void setLocation(int x, int y) { setLocation(x, y, 0);...
View Full Document

This document was uploaded on 12/17/2011.

Page1 / 3

final-sample-1-key - CSE 143 Sample Final Exam #1 Key 1....

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online