• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

URLYBird - Clarification of requirements

 
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
     
    Ranch Hand
    Posts: 188
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • 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
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    thanks jason
     
    Greenhorn
    Posts: 20
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • 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
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • 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
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • 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
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • 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
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • 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.
     
    What's brown and sticky? ... a stick. Or a tiny ad.
    a bit of art, as a gift, the permaculture playing cards
    https://gardener-gift.com
    reply
      Bookmark Topic Watch Topic
    • New Topic