![]() |
| ||
| SortedList & List Program Hello, I'm trying complie this SortedList Program and List Java, but I'm alot errors. If someone can help with this, I really appricated. Thanks Quote:
Quote:
|
| ||
| Re: SortedList & List Program Hello, deven1974 Lets start: 1. Illegal use of data and datatypes: public void remove(E data) {It is equal, if you write this String s;2. You didn't declare variable temp, but use it. 3. Why are you setting your just entered parameter no null and the working with it? |
| ||
| Re: SortedList & List Program Hello, Hey, thanks for you help, but I have little clue on this program. The is program I have do for my class. If you can able help with complie error message that I'm get while running this program. Thanks Should I String s; At the bottom is my program that I have do. The Sorted List ADT Implement the SortedList class. The SortedList class extends the List class. Both can be seen here. Your assignment is to implement all of the abstract methods of the List class. They are: * insert * iterator * remove * retrieve * search You must also implement an Iterator inner class for the SortedList class. You must submit a modified SortedList.java file with your source code. Do not submit and do not modify the List.java file. |
| ||
| Re: SortedList & List Program As I can see, you didn't read this post "We only give homework help to those who show effort". All I can do is give you advices: 1. About String s: String - is a class, when you create an object of class, the class "do not know about it". So you can't cll the object from the class (String.s = null). Also as in your program. 2. The phrase "data=null" in the begginig of the method is wrong (consider, you use it later...). 3.Befor using variables? you have to declare. That way compiler understands, what you will store in it. In your case the type is "E". this mean, that it unknown now, but will be known later. Also you have to know is the base type for all refference types is Object. 4. If you are writing "public void remove(E data)" it means, that function doesn't return value. The return keyword is not out of place. Also you can answer a questions and I'll try to answer. Good luck. |
| All times are GMT -4. The time now is 4:55 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC