• Post Reply Bookmark Topic Watch Topic
  • New Topic

What is meant by term 'Specification' in java?  RSS feed

 
bashaaa goud
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
asking this because i have seen in one article saying this "you need to use interfaces wherever you can observe specification"
see this link.
My question is exactly what do you mean by Specification in java in simple terms ?

Thanks in advance for your help
 
Campbell Ritchie
Marshal
Posts: 56553
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

You appear to have found the wrong forum; this forum is for discussing the forum itself. I shall move this question elsewhere.
 
Campbell Ritchie
Marshal
Posts: 56553
172
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please don't edit the [url] tags by hand; I have corrected them for you.

That blog looks unhelpful to me. Specification is not a Java® term, but a general computing term. It would mean something like this, for a BankAccount application:
  • All transactions must be an exact number of ¢, pence, ₹ etc
  • Whenever money is added the total must increase by the same amount.
  • Interfaces do not provide such functionality.

    I think you should ignore that blog.
     
    Maneesh Godbole
    Bartender
    Posts: 11445
    18
    Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    bashaaa goud wrote:asking this because i have seen in one article saying this "you need to use interfaces wherever you can observe specification"
    see this link.

    I am unable to find the quoted text on the link you provided. Did you somehow mixup some information?
     
    Campbell Ritchie
    Marshal
    Posts: 56553
    172
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    That is not a quote; the "quote marks" are misleading. What he says about needing to know input and output and not needing to know implementation is standard basic programming. The input and output represent (part of) the public interface of the class. Note that “the public interface of the class” is different from the abstract data type (ADT) called interface.
    The public interface means all the methods etc which can be accessed. The documentation describes the specification the class has been designed to.
    The ADT (I am not sure I am right to call it an ADT) called interface, in Java and also in C# is a specification saying, “All classes which implement me will have these methods,” along with a description of those methods; that latter constitutes a specification which implementing classes must follow.

    I think I was mistaken earlier saying interfaces don't provide such functionality. They provide no functionality, but they usually provide a description of what the specification ought to be.
    [edit]Change prove to provide[/edit]
     
    bashaaa goud
    Greenhorn
    Posts: 3
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Maneesh Godbole wrote:
    bashaaa goud wrote:asking this because i have seen in one article saying this "you need to use interfaces wherever you can observe specification"
    see this link.

    I am unable to find the quoted text on the link you provided. Did you somehow mixup some information?


    yes but the link say's same thing as i mentioned. So what do you think on this term 'Specification' more precisely.
     
    bashaaa goud
    Greenhorn
    Posts: 3
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Campbell Ritchie wrote:Welcome to the Ranch

    You appear to have found the wrong forum; this forum is for discussing the forum itself. I shall move this question elsewhere.


    My mistake, Sorry. but now how can i move this question to a correct forum? Any help?
     
    Stuart A. Burkett
    Ranch Hand
    Posts: 679
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    bashaaa goud wrote:My mistake, Sorry. but now how can i move this question to a correct forum? Any help?

    Campbell's already moved it for you. You just need to remember to choose the right forum next time you post a new topic.
     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!