Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

OOP 3 - Question

 
Rory Lynch
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am currently working on OOP3 SortNames. One of the objectives of the assignment is to learn about implementing Interfaces.

I would like to ask a question without going into detail or giving anything away hopefully.

In my solution to this assignment (currently undergoing scrutiny) I have implemented an Interface. My understanding is that when you implement an Interface your class must override every method of the Inteface.

I have left one method out, it is in the Interface but not in my class and it works
I dont know why it works
But I am sure you can tell me
otherwise I shall remain
 
Marilyn de Queiroz
Sheriff
Posts: 9063
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What class does your class extend? I know that it also implements an interface, but every class extends a particular class by default if one is not specified. Does that parent class implement that method of the interface that you're wondering about?
 
Rory Lynch
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes.

Thank you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic