These are to submitted to the Written Assignment 1 Drop Box on Moodle. You can write your solutions out by hand and scan them (there is a networked scanner in F-217, and several scanners in the library's Digital Resource Center), or create a file on your computer directly (submit as MSWord or PDF, please). After you have submitted, click on the drop box again to verify that your submission was successful.
"Written assignment" is sometimes a slight misnomer, because occasionally these assignments will include very small programming exercises.
Some written assignments will contain problems that are very challenging. You should read them as soon as they are assigned. Then if you need a couple of days to ponder one of them, you will have them.
The numbers in [square brackets] are problem numbers from the third edition of Weiss, for those who have that version.
Late days may be used or earned for written assignments.
These problems are for you to think about and convince yourself that you could do them. It would be good practice to actually do them in the next couple of weeks, but you are not required to turn them in.
public class HW1StaticMethods { public int pi; public static int psi = 5; public static int triple(int i) { return 3*i; } public int quadruple(int i) { return 4*pi; } public HW1StaticMethods(int i){ this.pi = i; } public static void main(String[] args){ HW1StaticMethods hw1 = new HW1StaticMethods(12); /*1*/ System.out.println(pi); /*2*/ System.out.println(psi); /*3*/ System.out.println(quadruple(6)); /*4*/ System.out.println(triple(7)); /*5*/ System.out.println(hw1.pi); /*6*/ System.out.println(hw1.psi); /*7*/ System.out.println(hw1.quadruple(6)); /*8*/ System.out.println(hw1.triple(7)); }