| ||||||||||

Question:How will this homework be graded? i mean, will each partner have to do their own separate coding, or will both partners be able to code the same problem together? in other words, how will the "demonstration" be conducted? |

- Based on my understanding, the partners will be able to answer the questions together and code according to pair programming practices (where one is the driver and the other he navigator). Dawn Finney.

Question: Do we write the first method (min,max,stdev,& average) in it's own class window? or as a method in another class? |

- It depends on how you want to do it. I think it's easier to have all of the methods (min, max, stdev, average, and printStatistics) all in one class. Dawn Finney.

Question: I cannot find a way to find the square root of the numbers in the array... Do we have to make our own method or is there something in JAVA that I don't know about? I've been googling it, but haven't had any luck. Thanks! |

- There is a static method in the Math class that takes a double and returns the squareroot of that number as a double.
`public static double sqrt(double x);``double answer = Math.sqrt(16); //answer would have 4.0`

Joel Uthe

Question: Will we really be asked to do 3 methods like the ones listed in half an hour? It seems a little rushed. |

- You do have two people working together on problems similar to the ones already posted. You should be able to do it. Dawn Finney.

Question: We're getting an error for the following code:public static void printStatistics(int [] numbers){ int length = numbers.getLength(); Java keeps thinking numbers is a method... Any ideas? Thanks. |

- It looks like your error got trimmed off. Be sure to include the <code>code tags for items with * and errors with < signs </code> Also
`numbers`is an array, and the length is accessed as a public variable numbers.length; not the method you are using. Joel Uthe

Question: Apologies, here's the fixed code and a new error public static void printStatistics(int [] numbers){ int length = numbers.length(); Error: cannot find symbol symbol : method length() location: class int[] |

- It still is being called as a method. Try removing the parenthesis to call it as a variable. Joel Uthe

Question: I was wondering whether it is still possible to change our time slot and if so the steps we should take to do so. Thanks. |

- Email the TA with the old timeslot and the other TA with the new timeslot and try to work something out. Dawn Finney.

- Homeworks-Fall 2007 last edited on 23 December 2007 at 7:08 pm by adsl-152-173-97.asm.bellsouth.net