aspose file tools*
The moose likes Beginning Java and the fly likes Designing a Java System Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Designing a Java System" Watch "Designing a Java System" New topic
Author

Designing a Java System

Ryan Waggoner
Ranch Hand

Joined: Jun 27, 2007
Posts: 75
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!
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39755
    
  28
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 . . .
 
 
subject: Designing a Java System