• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

What if not all of the methods in the provided interface are implemented?

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I was wondering if all the methods defined in the interface MUST be implmented. That means for instance, since I'm not using the create method, I wouldn't have to implement it, just declare it in the data class as requested in the assignment.

Do this conform the requieremens asked by sun?
 
Ranch Hand
Posts: 2410
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, you are required to give a valid implementation of every method listed in the interface. However, you are not required to actually do anything inside the methods. For example, if one of the methods has a return type void, then all you have to have is an empty body of the method, and that is a valid implementation. If the method has a return type other than void, all you have to do is return a value that is compatible with the return type.
 
jason wong
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Keith!,

thanks a lot for your quick answer.
 
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But I've a feeling you'd get a serious detraction in your score if you went that way.
Better implement and test everything on the database level, and then not use it all in the client.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!