Forums Register Login

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

+Pie Number of slices to send: Send
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?
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
Hi Keith!,

thanks a lot for your quick answer.
+Pie Number of slices to send: Send
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.
a fool thinks himself to be wise, but a wise man knows himself to be a fool - shakespeare. foolish tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 509 times.
Similar Threads
Interface methods
nested interface
can we have private methods in an abstract class?
PaSSED SCJD!
Doubt related to information provided on page 86 of HF book
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 04:38:16.