Results 1 to 15 of 15
Thread: Interface help
- 06-01-2011, 10:09 PM #1
Member
- Join Date
- Jun 2011
- Posts
- 18
- Rep Power
- 0
- 06-01-2011, 10:13 PM #2
Suggested reading : Interfaces
GoldestJava Is A Funny Language... Really!.gif)
Click on * and add to member reputation, if you find their advices/solutions effective.
- 06-01-2011, 11:27 PM #3
Member
- Join Date
- Jun 2011
- Posts
- 18
- Rep Power
- 0
Ok I know the idea of an Interface but what I dont know is what to do to implement the in the other classes, what your have to do in them other classes etc...
It might say it in the link you gave but its not clear there when concerning my problem...
So an Interface is like a contract in Java... Other classes can use them without knowing the method. So do I have to write a new method for every class that implements an interface?
For example, I have these two things in the interface which I want implemented in other classes.
What do I need to do to implement them in another class? I know you have to write something like:Java Code:public void moveToCentreStage(); public void performDanceStep(int stepNumber);
So do I put the interface things into instance variables?Java Code:public class DancingRobot implements DanceMoves
Where do I put these? Do I just put them as a new method like you would do anyway?
Kind regards
- 06-02-2011, 12:15 AM #4
@OP:
Don't edit/remove a first/previous post (apart from minor corrections that don't interfere with the thread's meaning). I'm passing by hoping to read something interesting, and you just "teared the first page out of my book".
Close a thread but don't ruin it!Last edited by Jodokus; 06-02-2011 at 12:28 AM. Reason: spelling
No bug ever had to calculate its fitnessfunction.
- 06-02-2011, 12:22 AM #5
Member
- Join Date
- Jun 2011
- Posts
- 18
- Rep Power
- 0
How do you close a thread?
.gif)
Basically I cant have anything to do with what I'm doing over the Web because it will be cross referenced by my tutor!
Sorry about that! I didnt know there was a way to delete a thread or 'close' as you say?
regardsLast edited by tdman; 06-02-2011 at 12:26 AM.
- 06-02-2011, 01:00 AM #6
So what? How else are you supposed to learn?
On these forums at least, you'll find that people won't simply hand you complete solutions. They'll demand that you show your work and ask intelligent questions, and then only give you enough help to solve the problem yourself. If your tutor has a problem with that... frankly, you need a new tutor.Get in the habit of using standard Java naming conventions!
- 06-02-2011, 01:01 AM #7
Uhmm. I have to admit I can't find it anymore. I thought is was under threadtools if you're in your own thread, but I just failed to find it. (I also don't see recent closed threads anymore.)How do you close a thread?
For the moment I appreciate your concern ;>) Can anybody else help out how to close a thread?Last edited by Jodokus; 06-02-2011 at 01:18 AM.
No bug ever had to calculate its fitnessfunction.
- 06-02-2011, 01:14 AM #8
Member
- Join Date
- Jun 2011
- Posts
- 18
- Rep Power
- 0
- 06-02-2011, 01:16 AM #9
Member
- Join Date
- Jun 2011
- Posts
- 18
- Rep Power
- 0
- 06-02-2011, 10:40 AM #10
Java Is A Funny Language... Really!.gif)
Click on * and add to member reputation, if you find their advices/solutions effective.
- 06-02-2011, 01:42 PM #11
Member
- Join Date
- Jun 2011
- Posts
- 18
- Rep Power
- 0
- 06-02-2011, 01:50 PM #12
You are not supposed to delete the thread once you get the answers to your questions. Now about this thread, you can't delete it.
But just keep in mind next time, that don't delete the contents of your primary posts which describes the problem. Because if you do that, other people willing to help you or coming across same issues won't get to know what happened here and they simply end up seeing a blank first entry.
Hope you understand that,
GoldestJava Is A Funny Language... Really!.gif)
Click on * and add to member reputation, if you find their advices/solutions effective.
- 06-02-2011, 02:00 PM #13
The purpose of a forum is to share problems and their possible solutions. This isn't just a free helpdesk, although it may sometimes appear that way.
Forum posts also form a repository of knowledge and discussion, and all prominent forums (including this one) are indexed by the major search engines. If you don't believe that, take the first sentence from any post more than about 15 minutes old and plug it into Google, and see what you get as the first hit.
So, don't repeat this. If you have a copy of your original post, please edit again and restore the content.
db
- 06-02-2011, 05:11 PM #14
Member
- Join Date
- Jun 2011
- Posts
- 18
- Rep Power
- 0
Ok guys, this wont happen again... Sorry for the hassle I have caused. I just didn't want my tutor to find it! Next time I will re phrase everything in examples that do have any keywords that I am doing at the moment!
So again sorry people..gif)
Kind regards
- 06-02-2011, 05:19 PM #15
Moderator
- Join Date
- Apr 2009
- Posts
- 10,460
- Rep Power
- 16
Similar Threads
-
Interface
By Anandiscool in forum New To JavaReplies: 3Last Post: 05-02-2010, 07:51 AM -
Is there a GUI interface for...
By smith427 in forum New To JavaReplies: 3Last Post: 12-03-2009, 07:17 AM


LinkBack URL
About LinkBacks
Reply With Quote
.gif)

Bookmarks