AVL tree confusion, syntax confusion, just general confusion really...
I am quite new to java and my professor kind of dumped this project on us and has done a very poor job of answering our questions and making sure we understand what we are doing.
we are supposed to implement a set class and a map class using the AvlTree class below. we are supposed to use these to make a program that takes a text file and prints a concordance of all words in the text file and a list of all the line numbers on which they appear.
I don't want anyone to do my project for me but I just need some direction. Am I supposed to like make a Map with the words as keys and then the values are actually sets of all the numbers. Are the maps and sets supposed to be extensions of the AvlTree class, if so how am I supposed to Order a Map if the keys are not numerical?
it would also help tremendously if someone could just explain what this means
public class AvlTree<AnyType extends Comparable<? super AnyType>>
if nothing else just that would really help. I don't understand the syntax at all and as such I'm just bewildered by this class. I understand the ideas behind an AVL tree and I can draw the diagrams all day long but the syntax of the code is just beyond what we have actually learned yet.
Re: AVL tree confusion, syntax confusion, just general confusion really...
Please post the code you are having problems with here on the forum.
See the tutorial about Generic coding: Lesson: Generics (Updated) (The Java™ Tutorials > Learning the Java Language)