File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

URLYBird - Clarification of requirements

 
Richard Green
Ranch Hand
Posts: 536
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

I am currently working on URLYbird 1.2.1 and the requirements for the Client GUI are:

The user interface for this assignment must satisfy the following criteria:
  • It must be composed exclusively with components from the Java Foundation Classes (Swing components).
  • It must allow the user to search the data for all records, or for records where the name and/or location fields exactly match values specified by the user.
  • It must present search results in a JTable.
  • It must allow the user to book a selected record, updating the database file accordingly.


  • Does this mean that the delete(), create() methods in my Database interface will never be used? If so, whats the point in implenting these interface methods?
     
    Jason Moors
    Ranch Hand
    Posts: 188
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    The requirements state that you must implement the DBMain interface, so I would recommend that you implement the delete, create methods as the interface could be used by other applications.

    I believe some people have thrown a Runtime Exception stating that the method is unsupported, however I don't know if they were marked down for this approach, and for the sake of a few lines I think it's better to be safe than sorry!

    The assignment does state that the user interface should be designed with the expectation of future functionality enchancements.

    Jason
     
    Richard Green
    Ranch Hand
    Posts: 536
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    thanks jason
     
    tom smith
    Greenhorn
    Posts: 20
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    I am finishing up URLyBird 1.2.3:

    I did add some methods to the supplied interface DBAccess. But I didn't extend DBAccess, I merely modified the one given.

    I did this thinking it would be OK since it was an in-house application.

    But after re-reading the Instructions, I see it says the CSR's use a 'custom-written application'. This would indicate the supplied interface needs to be extended with my added methods.

    Is this how you guys saw it?
     
    Jason Moors
    Ranch Hand
    Posts: 188
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    I wouldn't recommend modifying the DBAccess interface.

    If you need to add additional methods (like getMetaData or additional search methods) I would create a new interface i.e EnhancedDBAccess which includes the new methods, then in you Data class you can implement both the DBAccess and EnhancedDBAccess. Thereby not modifying the existing interface.

    Jason.
     
    tom smith
    Greenhorn
    Posts: 20
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Yea....

    bad idea.

    I just spent an hour adding a new interface which extends the one supplied and the adjusting the code. Compiled and ran OK in both modes.

    Thx.
     
    tom smith
    Greenhorn
    Posts: 20
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Can we just add Exceptions to the original DBAccess interface?

    Specifically RemoteException.

    Will this 'break' code already in place?
     
    Jason Moors
    Ranch Hand
    Posts: 188
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    You are not allowed to change the method signatures of the original interface. So you can't add RemoteException, nor would you want to.

    There are a number of posts regarding the handling of remote exceptions, if you search this forum. You basically need to create an additional remote interface which extends the UnicastRemoteObject.



    Jason.
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic