Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

local and network mode

 
Beny Na
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,


i am trying to design URLBi assignment by creating another DBMain interface to support network operation(assumed DBMain(network)), and the design will have two different data class for both local and network.
roughtly like below code:

<<DBMain(network)>> extends <<DBMain>>(original from sun)
Data(network) extends <<DBMain(network)>>
Data(local) extends <<DBMain(local>>

is there a way to avoid having two data class for local and network since the code does not have any difference(the code inside data class(local) and data class(network) is exactly the same, except it must extends remote and throws RemoteException)?




thanks

kaizen
 
Diego Amicabile
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might consider using composition instead of (or along with ) inheritance
[ March 20, 2005: Message edited by: Diego Amicabile ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic