• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

FBN : Design

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all,
I'm working on the old FBN assignment.
Can you give me ur opinion in this part of my design
I did the following :
1- DataInterface interface contains all the public methods in Data class and I made all of them in the interface throw RemoteException.
2- public interface RemoteData extends DataInterface,Remote {}.
3- I modified the Data class to implement the DataInterface
(e.g public class Data implements DataInterface )
4- I created RemoteDataImp which implements RemoteData (where I implemented the lock() and unlock() methods

*** Is that ok to modify the signature of the Data class to implement the DataInterface
(e.g public class Data implements DataInterface ) ??
Best regards, Ahmed
 
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ahmed,
Welcome to this forum and hope you'll enjoy it.
I got one of the new assignments (URLyBird 1.2.1) and I know it is quite different : while I got a db interface I cannot modify and that I must implement in some new Data class "from scratch", AFAIK you received an existing data class to be improved by modification or extension.

*** Is that ok to modify the signature of the Data class to implement the DataInterface
(e.g public class Data implements DataInterface ) ??


As it seems that you may modify the provided Data class, I don't see any reason, a priori, why you couldn't make it implement any interface.
Is anybody out there who got the FBN assignment and who could help Ahmed much better ?
I am pretty sure Andrew will do it when he comes back from his sunny beach.
Best,
Phil.
 
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ahmed,
I modified Data class slightly it was ok (i passed fbn). They are fine with it as long as you are able to back up your decisions in docs: modification vs composition vs extention.
 
Philippe Maquet
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Svetlana,
Thank you for keeping around. I finally got the time to reply to your previous post BTW.
Best,
Phil.
 
author and jackaroo
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ahmed,

Originally posted by Ahmed Agizaa:
Is that ok to modify the signature of the Data class to implement the DataInterface
(e.g public class Data implements DataInterface ) ??


Just agreeing with Phil and Svetlana:
I can't see any problems with that. You are not going to break any existing code by doing that, so you should be fine.
Just as long as you have something in your Design Choices document describing why you did that.

Originally posted by Philippe Maquet:
I am pretty sure Andrew will do it when he comes back from his sunny beach.


:roll:
I would make some sarcastic comment, but the surf is up, and I have to go
Regards, Andrew
 
Ahmed Agizaa
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you all for your help , Ahmed
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic