Hi guys,
I'm having some trouble fully understanding my assignment (B&S). Maybe this is because English is not my mother tongue... Your views will be highly appreciated. Thanks for taking time to read all this.
These are my questions (I'm sorry I have too many questions):
1 - Required interface
"Your data access class must be called "Data.java", must be in a package called "suncertify.db", and must implement the following interface:
package suncertify.db;
public interface DBMain {..."
I believe this requirement exists "because the data must continue to be manipulated for reports using another custom-written application..."
While I'm planning to have a Data.java implementing DBMain, am I forced to interact to the database using the DBMain interface? Because I could make Data.java to implement the required interface to keep compatibility with the custom-written applications plus another interface that will be more convenient for the way I want to implement the solution. One of the limitations I perceive is detailed in 2.
2 - The find method
"// Returns an array of record numbers that match the specified
// criteria. Field n in the database file is described by
// criteria[n]. A null value in criteria[n] matches any field
// value. A non-null value in criteria[n] matches any field
// value that
begins with criteria[n]. (For example, "Fred"
// matches "Fred" or "Freddy".)
public int [] find(
String [] criteria)
throws RecordNotFoundException;"
According to my point of view, this makes little sense for the specialties field: if the user of the interface tries to find "Glass" in a field that contains "Air Conditioning, Glass" he/she won't get the record. Am I understanding this properly? I thought of using the Data.java just to read and persist the data from my business layer, but implementing the data cache and search in it to decouple my implementation from the old database.
3 - GUI
"It must present search results in a JTable."
According to what I've been reading, most of the people implemented the solution using just a JTable to show the information to the end users. Here also the specialties issue makes things more complicated. The overview section states: (CSRs) "take requests from home owners for a type of service, and offer the homeowner one or more contractors that can provide the required services".
For me, it makes sense if the CRSs are able to find companies that can provide the required service or services (maybe restricting the search to a specific city). I feel this is the natural for the CRSs to find the information they need.
I thought of implementing the GUI like this:
- a JTable that shows all the contractor's information but the specialties field
- a JPanel with the complete information for the customer including a JList with the sorted set of the specialties. This panel would be linked to the JTable: selecting a row in the table would update the contents of the panel accordingly. This panel could also be used as a search panel, and the results of the search would update the JTable.
4 - Booking
From the business point of view the booking of the contractor does not make sense for me. I understand that the client can book for a contractor and while it is booked nobody else can receive services from the same contractor. Am I getting this right? If a contractor has 50 employees and I want to paint my small bathroom... will the contractor be impeded to service another client until it is finished with my bathroom?
I don't want to fail the assignment for not understanding it properly. I'm sorry if I'm not very clear with presenting my ideas... please contact me if you feel you need more information or you need me to explain my point of view in a different way.
Again, thanks a lot for helping me with this...
Marcelo.