the instruction said that I should write a Data class implements DBMain interface, but the DBMain interface does not extend Remote, so do I need to write a new interface extending Remote and a class implements it and do the exactly what Data do?
In the instruction, it mentions that the users are allow to SEARCH and BOOK only. It does not mention that the user will create, delete records.
Thus, in fact, functions provided by DBMain is more than the instructions required.
In my implementation, I created an interface DBOperation, which provides the 2 functions (Search and book) only, that implements by the GUIController and Database.
Note: GUI client calls GUIController, where GUIController calls the methods in Database, and Database calls Data to perform the real operation.
Some people mentioned that make two adapters for each mode: standalone and networked, but I don't know how to achieve this
Your command line will specify this:
For local connection:
java -jar runme.jar alone
For remote connection: java -jar runme.jar
In my implementaion, my client detects the input, if is alone, the GUIContrller gets the connection from local. Remote otherwise.
Hope this help.
Nick.
SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)