• 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

for Marlene Miller on next step toward scjd

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

u had suggested steps to go aheadfor Jtable and database...could u suggest somethin for other APIs like threads, guis...

The steps u suggested were lot of help...

they were:

Step 1. Read and write records to a RandomAccessFile.

All records have the same length. A record has 3 fields. The first field is an integer (4 bytes, binary data). The second field is ASCII text padded with spaces. The third field is ASCII digits padded with spaces.

Step 2. Create a GUI with a JTable and a TableModel (and a menu and some buttons, if you want). Read the records from the RandomAccessFile and display them in the JTable. Change the values in the JTable and update the record in the file.

Step 3. Add a search button and two text fields above the JTable. Enter data into the text fields. Push the search button. Search the RandomAccessFile for all records matching the specified data. Move the data from the records to the TableModel to the JTable.

Step 4. Add a book button to the JTable. Select a row in the JTable. Change some data in the row. Push the book button. Replace the record in the file with the changed row.

Step 5. Run two programs, a client and a server. The RandomAccessFile goes on the server. Write a server program to read and find records. Use RMI to access the file from the client.

Also i was bit unclear with the 5th step...the file is in server...the read and find methods are also on the server...ill use RMI to activate those commands and get the result....If you could correct my understandin..thanx

Abhi
 
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Abhi.

I am happy to know my suggestions were helpful. Thank you. I don�t know what else to suggest, because that is about all I know.

Let me try to explain my suggestion 5. On the SCJD, you have a choice between using sockets or RMI. This example is to get a little practice using RMI.

Write two (small) programs, the client program and the server program. The server program reads the database file. The client program displays the data in a JTable. Some people put the �business logic� in the client program, other people put it in the server program. I am not saying where to put it.

The GUI has a search button, a JTable and a book button. The business logic has a search function and a book function. The database access has find, read and update methods.

Now use RMI so that the client program can access the database. Some method(s) in the client have to call a method(s) in the server program. It depends on where your business logic is, whether that method is a business search() or a database find(). Define a remote interface (either business methods or database access methods). The server implements the interface. The client uses the interface to access the remote object.

I wish I could suggest some thread warm-ups. Maybe after you do step 5, you can think about what would happen if two clients try to access the database.

Step 6. Download the assignment. (I haven�t gotten to step 6 yet. )

Good luck Abhi.
Marlene
[ October 20, 2004: Message edited by: Marlene Miller ]
 
Abhi Chat
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Marlene,

Thanx for the explanantion...ill get this thing started...even i havent got to step 6 so as things go on ...we can keep ourseleves updated...

abhi
 
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Marlene and Abhi,
Until I got the assignment downloaded I wasn't focussed. Now the problem is more clear and every effort can be taken to solve it.

Per my understanding assignment don't have an expiration date. So once you download you can go on thinking over it forever. That is fun.

If you purchase the voucher for exam there is a one year deadline. So just purchase the assignment alone.

Jiju
 
Marlene Miller
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for the advice and your concern, Jiju. Marlene
 
Ranch Hand
Posts: 531
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by jiju ka:
Marlene and Abhi,
Per my understanding assignment don't have an expiration date. So once you download you can go on thinking over it forever. That is fun.



Jiju, it is not fun
[ October 20, 2004: Message edited by: Anton Golovin ]
 
Are you here to take over the surface world? Because this tiny ad will stop you!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic