Results 1 to 3 of 3
- 10-04-2011, 12:46 AM #1
Member
- Join Date
- Apr 2011
- Posts
- 7
- Rep Power
- 0
I don't understand what I'm supposed to do...
So today I got this programming assignment which is due in a week but I don't even understand what is being asked of me. Since my professor sucks at getting back to me via email, I have come to the internet for help.
Create two implementations of the StringLogInterface interface as provided on [our school's website].
One of your implementations must use an array for storage and the other must use a linked list for storage. You may not use any of the pre-defined Linked List classes, nor may you use an ArrayList.
This was given to us on our school website:
How do I get started? I'm not asking for anyone to write my code for me, just help me get started please! Thank you.Java Code:package stringLogs; public interface StringLogInterface { void insert(String element); // Precondition: This StringLog is not full. // // Places element into this StringLog. boolean isFull(); // Returns true if this StringLog is full, otherwise returns false. int size(); // Returns the number of Strings in this StringLog. boolean contains(String element); // Returns true if element is in this StringLog, // otherwise returns false. // Ignores case differences when doing string comparison. void clear(); // Makes this StringLog empty. String getName(); // Returns the name of this StringLog. String toString(); // Returns a nicely formatted string representing this StringLog. int howMany(String element); // Returns an int value indicating how many times element occurs // in the StringLog. boolean uniqueInsert(String element); // This method inserts element into the StringLog unless an identical // string already exists in the StringLog, in which case, it has // no effect on the StringLog. If it does insert the string, it // retuns true; otherwise it returns false. String smallest(); // This method returns the smallest string in the StringLog. By // "smallest", we mean in terms of the lexicographic ordering // supported by the String class's compareTo method. As a // precondition, you should assume that the StringLog is not // empty. }
- 10-04-2011, 01:05 AM #2
- Join Date
- Jan 2011
- Location
- Richmond, Virginia
- Posts
- 3,069
- Blog Entries
- 3
- Rep Power
- 7
Re: I don't understand what I'm supposed to do...
Any time you see 'identifier methodName(Args);' create a method which does what is said in the comments.
- 10-04-2011, 03:01 AM #3
Member
- Join Date
- Sep 2011
- Posts
- 20
- Rep Power
- 0
Similar Threads
-
So I'm supposed to convert seconds to hours...
By nope in forum New To JavaReplies: 5Last Post: 02-13-2011, 11:46 PM -
small method isn't supposed to go under 0
By senca in forum New To JavaReplies: 2Last Post: 08-09-2010, 01:23 PM -
Values change when they're not supposed to
By m00nchile in forum New To JavaReplies: 7Last Post: 05-15-2010, 04:16 PM -
JButton doesn't disappear when it is supposed to?
By ecliptical in forum New To JavaReplies: 4Last Post: 01-25-2010, 12:41 AM -
Help interpreting what a class is supposed to do
By bornwithnoname in forum New To JavaReplies: 2Last Post: 11-20-2008, 12:19 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks