Tuesday, April 5, 2011

What's testable for Written Test 3 and Labtest 3

Everything in the entire course is testable, except GUI.  For greater clarity, GUI will be on neither the written test nor the labtest.

Although everything except GUI is testable, emphasis will be on the material covered since Test 2.  This includes:
  • Recursion, including recursive sorting
  • Linked lists
  • Inner classes
  • Generics
  • Iterable and Iterator

18 comments:

  1. public class LinkedList
    --------------
    E can be a class or an interface.

    So, in this case is Comparable a class (not interface)? Because you can't extend an interface because you are just inheriting a method header.

    I can't the API for the class Comparable.

    ReplyDelete
  2. I meant
    public class LinkedList

    ReplyDelete
  3. public class LinkedList ( E extends Comparable )

    I replaced "<" with "(" because it won't show up on the comments.

    ReplyDelete
  4. Comparable is an interface. In the syntax you mention, you always use "extends", never "implements", even if it's an interface (like Comparable). Confusing! I'm just the messenger ...

    ReplyDelete
  5. Professor Eckford,

    I know a few students have already asked about this, but is it possible for you to give us another practice lab? It would be good to get more practice with recursion and linked lists.

    Thank you

    ReplyDelete
  6. For eclipse, how to you put in an argument (args) before running the program?

    Thanks

    ReplyDelete
  7. Does anyone know when the labtest3 start? Thanks a lot.

    ReplyDelete
  8. I don't really know how recursive function works.
    when do i need a helper method ?

    ReplyDelete
  9. Sir can you please post up the solutionbs fir lab 7 & 8. Would really help. Thanks

    ReplyDelete
  10. @8:34 PM

    what's a helper method?

    ReplyDelete
  11. You have said in calendar to covered 15.1 - ArrayList. 15.2 is generics. Are we supposed to covered 15.1 or 15.2?

    ReplyDelete
  12. About above post, I meant 14.1 and 14.2

    ReplyDelete
  13. So... how does this work structure-wise? My exam timetable just has the one 3-hour slot for CSE1030, and as far as I've been able to find there's been no mention of another timetable for the labtest, so what's the deal?

    ReplyDelete
  14. @Woody

    I think the reason why linked list extends the interface in this case is for the following reason:

    When a class implements an interface, it is required to implement all methods within the interface. In the case of linked list, you don't want to define the compareTo method within the linked list class because you aren't comparing two linked lists, you are comparing two nodes. As such you can define a generic data type for the node, and by having linked list extend the interface comparable, you can ensure that any generic data type used for the node implements comparable, and you can write your methods within linked list on the basis of knowing that any data type that can be defined as a node has a compareTo method defined within it. This is handy for sorting a generic linked list as you can ensure that, regardless of what type of data is passed, and how its natural ordering is defined, you can sort your data on the basis of the compareTo method.

    Therefor LinkedList extends comparable, and thus any data type used as the node should implement comparable. This is just my understanding, and I am going to mess around with this idea and test it out.

    ReplyDelete
  15. I would like to make sure if Java Doc is going to be on either the tests or not??

    Proff please reply ASAP

    Thank You

    ReplyDelete
  16. "Everything in the entire course is testable, except GUI." That is my last comment on what is and is not testable.

    ReplyDelete
  17. Just a question, are we suppose to know how to use the iterator, or do we have to know how to write the methods for it?

    ReplyDelete
  18. @Woody
    /*Woody said...

    For eclipse, how to you put in an argument (args) before running the program?

    Thanks
    April 7, 2011 12:20 PM
    */

    The way i found it is:
    **********************
    1- press on Run tab, from toolbar.
    2- press Run configuration.
    3- on the middle of the page choose: "(x)=Argument" tab, beside the "Main" tab.
    4- Underneath the "Argument" tab, text field, titled with "program arguments".
    5- write your args there.
    6- press Run, in the bottom.

    good luck,
    Gomaa

    ReplyDelete