Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 A_Object I_Comparable App_B Klassehierarki I_Container A_Container I_Stack I_Queue I_Graph I_Tree I_SearchableContainer I_OrderedList I_SortedList I_HashTable.

Similar presentations


Presentation on theme: "1 A_Object I_Comparable App_B Klassehierarki I_Container A_Container I_Stack I_Queue I_Graph I_Tree I_SearchableContainer I_OrderedList I_SortedList I_HashTable."— Presentation transcript:

1 1 A_Object I_Comparable App_B Klassehierarki I_Container A_Container I_Stack I_Queue I_Graph I_Tree I_SearchableContainer I_OrderedList I_SortedList I_HashTable I_Set A_Graph A_Tree A_SearchableContainer I_SearchTree A_HashTable A_Set StackAsArrayStackAsLinkedList QueueAsArrayQueueAsLinkedList GraphAsMatrixGraphAsLists SetAsArray ChainedHashTable GeneralTree BinaryTreeBinarySearchTree OrderedListAsArrayOrderedListAsLinkedList SortedListAsArraySortedListAsLinkedList Wrappers

2 2 Arv-Klassehierarki Object X X Enhver Java-klasse X (inkludert array’er) vil alltid være arvet (direkte eller indirekte) fra en klasse kalt Object. Object A A X X

3 3 Klassen Object Litt av innholdet i klassen Object: public class Object { public final Class getClass ( );// return classname public String toString ( ); public boolean equals (Object obj);// equal if ref to the same object public int hashCode ( ); … }

4 4 Arv - Klassehierarki-diagram Concrete classAbstract class Interface extends Interface extends Interface implements Interface implements Concrete class Abstract class Concrete class extends Concrete class

5 5 A_Object I_Comparable Klassehierarki I_Container A_Container I_Stack I_Queue I_Graph I_Tree I_SearchableContainer I_OrderedList I_SortedList I_HashTable I_Set A_Graph A_Tree A_SearchableContainer I_SearchTree A_HashTable A_Set StackAsArrayStackAsLinkedList QueueAsArrayQueueAsLinkedList GraphAsMatrixGraphAsLists SetAsArray ChainedHashTable GeneralTree BinaryTreeBinarySearchTree OrderedListAsArrayOrderedListAsLinkedList SortedListAsArraySortedListAsLinkedList Wrappers

6 6 Interface I_Comparable Interface I_Comparable som inneholder sammenligningsmetoder:

7 7 Abstract A_Object som implementerer I_Comparable

8 8 Abstract A_Object Implementering av compare og innføring av abstract compareTo

9 9 Implementering av clone Abstract A_Object

10 10 IntA_Object I_Comparable Wrappers Dbl Chr Str

11 11 Int

12 12 Dbl

13 13 Chr

14 14 Str

15 15 Interface I_Comparable Interface I_Comparable som inneholder sammenligningsmetoder:

16 16 ENDEND


Download ppt "1 A_Object I_Comparable App_B Klassehierarki I_Container A_Container I_Stack I_Queue I_Graph I_Tree I_SearchableContainer I_OrderedList I_SortedList I_HashTable."

Similar presentations


Ads by Google