• 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

help!

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, my dear friends,
I have just download the FBN assignment. Now, there are some points that I am not sure. I want to know your idea. Give me some hints will you? Thanks.
1 At any given time, there should be only one data instance who visits the db.db file. Because if there are more than one data instances, the synchronization will lost its effects, multiple data instances can rewrite the program at the same time.
2 If 1 is right, then,local mode and remote mode can�t run concurrently. (when they visit the same db.db file. )
3.I have no idea about to what degree this application should be applicable.
lSay, I push the button to book a flight ticket, how should I book, get the record number from Jtable row?Must I input the amount of the tickets I want to buy, say, five tickets or six tickets? And how can I know whether my book is successful of not?
lIs it ok to just minus the available seats and feedback to the clients, without knowing who booked it or what his (her) seat number?
lIf it is later than the time when the flight takes off, must I adjust the number of the seats available to its max? But what is its max? And is it necessary for me to realize the renewal of any other flight records in the data base, although it isn�t required in the assignment. I am not sure about it.
Tell me your idea, thank you.
 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
start by going through these websites and faq's provided
https://coderanch.com/t/181202/java-developer-SCJD/certification/SCJD-FAQ
http://www.developergroup.org/
hope this helps,
take one step at a time you will find the answers yourself ..
hope this helps,
cheers,
parthi.
 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I agreed with your first point.I think Data should implement singleton pattern so only one Data instance would be exist.And I also think local Data should own lock/unlock mechanism because client maybe startup more than one application.
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. Yes, there is only one db.db file and Data class that will be running on the server.
2. You will not have the program running in local and remote at the same time.
3. You do not need the singleton pattern here, just by programming only one instance is all you need to assure that there is only one.
Mark
 
jiaquan sun
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much! Mark , Daniel and Parthiban
I reply so late. because I have few chance to browse internet.(and , excuse me , I was not confident with my English writing.)
a new question: I have originally made a design using MVC in my mind:
data---datamodel---rmi---datamodel_stub----control---view
but, the introduction say� 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�
then, if I must take the data as the datamodel ?and then there should be a data interface(not a implemented class)at client ? and does it mean that for each client the RMI create a new data Object and open the database?
Thanks ��.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic