File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes FBN :  Design Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "FBN :  Design" Watch "FBN :  Design" New topic
Author

FBN : Design

Ahmed Agizaa
Greenhorn

Joined: Oct 12, 2003
Posts: 4
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
Philippe Maquet
Bartender

Joined: Jun 02, 2003
Posts: 1872
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.
Svetlana Koshkina
Ranch Hand

Joined: Jul 08, 2003
Posts: 108
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

Joined: Jun 02, 2003
Posts: 1872
Hi Svetlana,
Thank you for keeping around. I finally got the time to reply to your previous post BTW.
Best,
Phil.
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11527
    
100

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


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Ahmed Agizaa
Greenhorn

Joined: Oct 12, 2003
Posts: 4
Thank you all for your help , Ahmed
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: FBN : Design