• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Writing Data Client

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My instruction:
“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 the network configuration.”
But my implementation include tow classes: DBClient that implements the same public methods as the suncertify.db.Data class and DBController that has different constructors to allow it to support the network configuration. Am I going to have less points as I don’t follow the instruction?
 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have only one interfac which implements all public method of data and one more method

RemoteServer interface extends DataClient.

LocaldataAccess class implements DataClient.
RemotedataAccess class implements RemoteServer.
Jawad
[ December 25, 2002: Message edited by: Jawad Kakar ]
 
Valeri Mikhailov
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But they ask: “although it will need different constructors to allow it to support the network configuration.”
And I don’t have getConnection () method in my Data class?
 
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


But my implementation include tow classes: DBClient that implements the same public methods as the suncertify.db.Data class and DBController that has different constructors to allow it to support the network configuration. Am I going to have less points as I don�t follow the instruction?


What Sun has in mind is some sort of a factory that creates instances of Data based on the database location, something like this:

If this is what your DBController does, that will do it, although I wouldn't name this class as "DbController".
Eugene.
 
Today you are you, that is turer than true. There is no one alive who is youer than you! - Seuss. Tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic