Clicker quiz 10/15/13 CSE 1102 Fall 2013
What output will the following method produce? public void sillyMethod(){ int grade = 91; int level = 5; if (grade >= 90) if (level <= 2) System.out.println("Alevel"); else System.out.println("Bstatus"); } Alevel Bstatus "Alevel" "Bstatus" No output is produced
public class Summer { public Summer(){ } public int getSum(int m, int n){ int sum = 0; for (int i=m;i<m+n;i++) sum = sum + i; return sum; Suppose donna is an instance of Summer. What does donna.getSum(1,4) evaluate to? 4 5 10 15
public class BallFrame extends Frame { private Ball[] _balls; public BallFrame(){ _balls = new Ball[20]; for (int i=0;i<10;i++) _balls[i] = new Ball(); } After I have constructed a BallFrame, which of the following Java statements would work (if executed in some method of BallFrame)? Assume Ball has a public getColor() method. _balls[20] = new Ball(); _balls[10].getColor(); _balls[0] = _balls[15]; Both A and C work Both B and C work
The midterm exam mean = 73.6 median = 76
Clicker questions 10/8/13 CSE 1102 Fall 2013