Thursday, February 3, 2011

Labtest 1 and Written Test 1 open thread

Go nuts.

21 comments:

  1. LabTest #1 will be held during your regular lab period.

    it says feb 3 on the Calendar, i am in section M, so my lab is on wednesday.
    does that mean i will have the lab test on wednesday?


    and also can i get the contant about test 1? what we will be testing on.

    ReplyDelete
  2. What exactly will be the content on the tests?

    ReplyDelete
  3. What chapters are assigned for labtest and written test? Is it 4,5,6 7, 8.1, 9 or is it just 4,5,6

    ReplyDelete
  4. I am curious.. should there be a copy constructor for immutable class as well?

    ReplyDelete
  5. I have written down on my lecture notes that immutable classes cannot have a copy constructor.

    However, I see that java.lang.String has a copy constructor, and String is an immutable class.

    Can someone please clarify whether immutable class can have copy constructor or not. I am confused?

    ReplyDelete
  6. Anonymous 11:41 and 5:07: Immutable classes do not *require* copy constructors. It's not illegal to have them, but it seems like a waste to me -- so we teach that immutable classes shouldn't have copy constructors. Not sure why java.lang.String would have one.

    ReplyDelete
  7. http://stackoverflow.com/questions/1803271/why-does-java-string-have-a-copy-constructor

    ReplyDelete
  8. Could anyone pastebin/email me their code for Lab 3 - I'd like to compare mine to someone elses for mistakes and what not. Thanks

    ReplyDelete
  9. Just to be sure, for the labtest, is it OK if we use the one true brace style (aka K&R style) instead of the style they made us use in CSE1020 (I think it's Allman style from the wiki page)?

    http://en.wikipedia.org/wiki/Indent_style

    ReplyDelete
  10. In lab 3, would it make sense to make defensive copies of the Date objects given that we provide a mutator to the object anyway?

    ReplyDelete
  11. I'm not sure about the Date class? I'm using this.getDay() and it tells me the method is depreciated? How do I fix it?

    ReplyDelete
  12. http://www.codingbat.com/java

    Lots of method writing given a set of specifications. Checks your work as well.

    Also, interesting link about the String copy constructor,I guess its extremely useful. Couldn't that usefulness be applied to other immutable classes are well?

    ReplyDelete
  13. 1:49: Sure, as long as you pick a style and stick to it.

    2:22: Yes.

    3:03: Are you using the custom Date class called for in the lab, or java.util.Date? You shold be using the custom Date.

    ReplyDelete
  14. I have not received any feedback for programming exercises 1, 2, or 3. What is the deal?

    ReplyDelete
  15. 12:49: I thought I finished everybody's feedback last week. Send me an email.

    ReplyDelete
  16. Are the cse accounts during the lab tests? I finished within the lab test time is over but I'm still unable to access my account for some reason.

    ReplyDelete
  17. Yes I didn't get a feedback of my labs as well. Sent you an email as well.

    ReplyDelete
  18. On labtest 1, were we supposed to also create the exception object or simply include "throws..." in the method header? Also, were we supposed to check for the number of students not being equal to zero when calculating the average? I didn't think we should as it does not state this as a precondition in the API.. and it also wouldn't make sense for one to want to know the average if there are no students.

    Thank you!

    ReplyDelete
  19. scale of 1-Chris Brown?

    ReplyDelete
  20. Will the marks for both the labtest and the written be posted online?

    ReplyDelete