• 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

B&S: How to handle the number of workers available in a record?

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

I need some clarification on the following statement from my assignment:

Bodgitt and Scarper ... offer the homeowner one or more contractors that can provide the required services ...



What does it mean exactly

I first thought that each one record from my data file describes one contractor. In that case I would allow the user of my application to select multiple records from the GUI view. I would not care about the number of workers available in the records.

But now, the size field comes into my eyes where the assignment says:

The number of workers available when this record is booked



Think that a contractor has 10 workers to offer for a specific location and a user want to book that contractor. Does this user then has to book the whole bunch of 10 workers or should he be able to book only 5

Any hints are welcome :roll:

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

I have interpreted the requirements such that a client books records. I did not do anything with the number of workers, except display it in the JTable.

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

then how did you interpret

Bodgitt and Scarper ... offer the homeowner one or more contractors that can provide the required services ...



Did you allow the user to select multiple records and book them in one bunch for convenience or did you allow one record to be selected and booked?

Regards,
Darya
 
Frans Janssen
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Darya Akbari:
Did you allow the user to select multiple records and book them in one bunch for convenience or did you allow one record to be selected and booked?



I did indeed make it so that multiple records could be booked in one bunch. Although I think that the requirement is still fulfilled even if multiple clicks are needed: the CSR can still book multiple contractors for one customer.

Frans.
 
Darya Akbari
Ranch Hand
Posts: 1855
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think a single select should be also fine. Otherwise one has to popup a new window to enter the owner id for all selected records, which I think is too much and not necessary for this assignment.

At least I hope it's not necessary

Regards,
Darya
 
Frans Janssen
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had a text box in the main window where the customer ID could be entered. The records were displayed in a JTable (of course), which I configured in multiple select mode.
Then if the book button was clicked, all selected records would be booked for the enetered customer ID.

So the user does not need to enter a customer ID for each separate record.

Frans.
 
Darya Akbari
Ranch Hand
Posts: 1855
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think I will steel that idea from you

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

I implemented my project in the same way as Frans, although I did not allow for multiple clicks (It is fairly easy to implement easy way, this was just a design decision on my part). A customer can book as many contractors as he or she wants, but has to book them one at a time. I did have the customerID persist in the JTextBox when the user selected a new record so they wouldn't have to keep on entering it though.
 
Darya Akbari
Ranch Hand
Posts: 1855
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

where did you guys placed the owner JTextBox?

I was actually allowing the user to select the row and to edit the owner column but I think your approach is cleaner, since you use the JTable only for presentation and keep the control seperate.

Or what do you think of my approach?

Regards,
Darya
reply
    Bookmark Topic Watch Topic
  • New Topic