• 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

Bodgitt & Scarper database & it's jtable display

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
There is a 1 byte flag for valid/deleted records in the datbase format. I presume I'm expected to parse this and only show valid records in the GUI's JTable?

Once I've booked a contractor, should that contractor still be displayed? There is no mention in the assignment about unbooking a contractor to make it availible for others to use,

any thoughts?

thanks
Tim
 
Enthuware Software Support
Posts: 4810
52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by tim parks:
Hi
There is a 1 byte flag for valid/deleted records in the datbase format. I presume I'm expected to parse this and only show valid records in the GUI's JTable?


I suspect that you've not yet thought about your Database class otherwise you wouldn't have asked this question The reason is that the delete flag is just an implementation detail of how your "database" handles deleted records. Your "select" queries will never return deleted records. In other words, since your Database class will never return deleted records (because logically they don't even exist), your GUI does not have to worry about it.
Yes, some code will be there to parse this byte and to determine whether it is a deleted record or not. But this code will not be a part of the GUI. Do you see the point?

Originally posted by tim parks:

Once I've booked a contractor, should that contractor still be displayed? There is no mention in the assignment about unbooking a contractor to make it availible for others to use,

any thoughts?
thanks
Tim


"There is no mention in the assignment ....", there you said it You are free to do what YOU think is appropriate. You can either show it in the GUI with the booking info in one of the columns (in this case, you'll also prohibit booking it.) or you can just not display any records that have been booked. Neither is wrong.
But whatever you do make sure you make a note of it and explain why you decided to do it.

HTH,
Paul.
 
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah, in general, what do [bold]you[/bold] think is correct? Start with that, at least.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic