Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
0 of .
Results for:
P. 1
Quiz

# Quiz

Ratings: (0)|Views: 8|Likes:

Published by: fffan1650716 on Oct 22, 2008

### Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as TXT, PDF, TXT or read online from Scribd
See more
See less

06/16/2009

pdf

text

original

public class quiz1{private int x;private int y; public quiz1(){x=3;y=5;}public int geta(int a){int b = x+a;return b+a + x;}public int getb(int c,int y){y=4;c=getc(3);return y+x+c;}private int getc(int a){int c=a+x*y;return c+1;}public static void main(String[] args){int a=3;int b=4;int c=5;quiz1 stuff = new quiz1();quiz2 stuff2 = new quiz2();quiz2 stuff3 = new quiz2(4);quiz2 stuff4 = new quiz2(1,2);a=stuff.geta(2)+stuff2.getb(2,1);b=stuff3.geta(7);c=stuff4.geta(a)+stuff3.getb(a,c);System.out.println(a + " " + b + " " + c);a=3;b=4;c=5;while(a<5){a=a+1;if (b<14){c+=c-4;b=b+4;}}System.out.println(a + " " + b + " " + c);a=3;b=4;c=5;a=stuff2.geta(2)+stuff4.getb(2,1);b=stuff.geta(7);c=stuff3.geta(a)+stuff2.getb(a,c);System.out.println(a + " " + b + " " + c);}}public class quiz2{private int c;

## Activity (1)

You've already reviewed this. Edit your review.