CSSE 221: Fundamentals of Software Development Honors
Homework to do before week 1 (due before beginning of class on Monday, Sept 4)
If you had any problems installing Eclipse, TortoiseSVN, or Subclipse, fix them.
There will be an assistant in Moench F217 from 7-9pm on Thursday and Sunday nights to help you.
Finish the JavaEyes assignment, including the questions below.
Skim chapters 3-5. These should be review, but if you are really rusty on your Java, you will want to read these more carefully to help answer the questions.
Do the following written problems. Please bring hardcopy to class to hand in Monday.
How many classes are in the JavaEyes project?
How many methods does the AnimatedPanel class in JavaEyes have?
How many constructors does the AnimatedPanel class have?
How many fields does the AnimatedPanel class have?
How does Eclipse let you determine all of
the above answers quickly, without looking at the actual code?
How would the design of JavaEyes have to change if we were to add an eye that moves independently of the others?
For instance, perhaps it continually rolls around clockwise. For this written part, concentrate on how the class structure should
change, not the exact implementation of the rolling eye.
What is the value of each variable after running the following code?
int x = 0, y = 0, z = 10;
while (x < z) {
y = y + x;
x++;
if (y > 10) {
y = y / 2;
}
}
Rewrite the above segment of code using a for statement.
Consider the Date class starting on p. 219 of Savitch.
What date is created by the expression "new Date()". Explain.
Give an example of how method overloading is used in this class.
Explain what would happen if I wrote the following code outside of the Date class. Hint: be careful!
Date d = new Date(9,1,2006);
System.out.println(d.monthString(3));
Ideally, should the monthString() method be static or not? Explain.