This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

a question about interface

 
Gerenne Vives
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello i have a doubt about the interface in the assignament UrlyBird , my questions are the following:

-Can I modified the interface or add methods??

-Can I create a interface that extends to the interface DB , and the class
data implemenst the interface that extends instead of DB .(This is because I want add two methods , and if I create a new interface , I can create this methods and in this interface and extends to the DB .)

thank in advance.
 
Frans Janssen
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Irene,

-Can I modified the interface or add methods??

No, you can't do that.

-Can I create a interface that extends to the interface DB , and the class data implemenst the interface that extends instead of DB .(This is because I want add two methods , and if I create a new interface , I can create this methods and in this interface and extends to the DB .)

Yes, that would be allowed.

thank in advance.

You're welcome!

Frans.
 
Charlie Goth
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, you can't change the interface.

Yes, you extend from the interface and implement that. Or you could just add methods to the class and not bother with the extra interface.

Charlie
 
Gerenne Vives
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok, thanks .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic