• 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

Designing a Java System

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey guys,
Sorry in advance if this question is out of place.

With that being said, my question is more about design than actual code. I am just thinking about designing a house alarm system (no real world value, just for fun) When I started designing (class diagram) it, I ended making the majority of my diagram interfaces.

My thinking with this was, for the system to work, (for example) an out side light must be able to detect movement, and must be able to turn on.

So normally I would make a class called OutsideList. But I made it into an interface because my thinking was, maybe someone wants to make an outside like that detects motion AND sound. So I wanted to let them....


With that thinking, everything turned into an interface, and my question is...Was that a good idea, or is it just making things annoying / diffucult to implement?

Thanks!
 
Marshal
Posts: 79153
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is OutsideList an unusual spelling of OutsideLight?

Probably a good idea to make a lot of entities interfaces; that allows more flexibility for future implementation.
But other people may have different ideas . . .
 
reply
    Bookmark Topic Watch Topic
  • New Topic