• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Writing Data Client

 
Valeri Mikhailov
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • 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?
 
Jawad Kakar
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • 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
  • 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?
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic