• 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:
  • Devaka Cooray
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
Bartenders:

Public interface to Data class

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,
this is my first posting to Java Ranch so here goes.
In the requirements document under the "Writing Data Client" section, there is the following text
"To connect with your server you should create a client program.
This implementation should include a class that implements the same public methods as the suncertify.db.Data class, although it will need different constructors to allow it to support network configuration".
My local and remote connections to the data class are separate classes but they both implement the same interface (containing all the public methods in the Data class). If I provide a factory
class to return either a remote or local connection to the database depending on the arguments passed have I satisfied the above requirement or do both types of connection really have to be in the same class?
Thanks in advance,
cheers,
doug
 
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Doug,
That sounds almost like what I did, except I also added an interface so that my gui does not have to have intimate knowledge of the DataInterface.
Read my answer to Vivian. http://www.javaranch.com/ubb/Forum25/HTML/000832.html
 
It's just a flesh wound! Or a tiny ad:
Paul Wheaton's 16th Kickstarter: Gardening playing cards for gardeners and homesteaders
https://coderanch.com/t/889615/Paul-Wheaton-Kickstarter-Gardening-playing
reply
    Bookmark Topic Watch Topic
  • New Topic