• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Chain of Responsibility Pattern

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Got the following from fluffycat.com
I have an interface-

There is 1 class implenting this interface-

I want the DVDCategory class to implement given interface.
Is the above correct?
Thanks,
Amrita
[added code tags - Ilja]
[ January 14, 2004: Message edited by: Ilja Preuss ]
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, it's not correct (which the compiler would tell you faster than any online forum ). Your class doesn't implement two of the methods specified by the interface.
Was the subject of this post a typo, by the way, because I can't see how this question relates to the chain of responsibility pattern?
[ January 14, 2004: Message edited by: Lasse Koskela ]
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
BTW, common coding convention is to start names of interfaces with a capital letter.
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm moving this discussion to Java in General - Beginner.
reply
    Bookmark Topic Watch Topic
  • New Topic