File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes NX: Contractors Search Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "NX: Contractors Search" Watch "NX: Contractors Search" New topic
Author

NX: Contractors Search

bharat kumar
Greenhorn

Joined: Jul 16, 2003
Posts: 11
Hi,
My assignment is Home Improvement Contractors,
In the DB interface the method for find is
// 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);
In the design i should have the JComboBox with the fields in database file to search for particular field or i should have a textfield for each field so that the user can search for the combination of fields.
If any one who had done this assignment earlier could suggest me the way they implemented.
Thank You,
Bharat.
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11404
    
  81

Hi Bharat
Welcome to JavaRanch.
Please change your displayed name to match the JavaRanch naming policy. You should display your last name, and either your first name or the initial of your first name. You may change it here.
There has been at least one case in the past where people have failed their assignments, and a comment from the examiner was that the user did not provide JComboBoxes. I have not heard of any problems the other way though - people providing only JComboBoxes do not seem to have any problems. (I did the older assignment (Fly By Night Services) and only had JComboBoxes. My GUI got 100%.)
So I would definately recommend JComboBoxes.
Regards, Andrew


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
bharat kumar
Greenhorn

Joined: Jul 16, 2003
Posts: 11
hi Andrew,
thanks for your suggestion.
is it o.k the displayed name now.
One more question the original interface DB provided by sun does not have any methods for getting the list of contractors. i have seen many posts that we should not modify the original interface, now i am having one more interface called DBMain which extends DB, in my Data access file i am implementing DBMain.
But in instructions it says
Your data access class must be called "Data.java", must be in a package called "suncertify.data", and must implement the following interface:
Is that Data Access class should implement DB only.
Thank you,
Bharat.
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11404
    
  81

Hi Bharat
is it o.k the displayed name now.

Perfect. Thank you.
Is that Data Access class should implement DB only.

This has been discussed several times, and the consensus seems to be that you:
  • Must implement all the methods in the interface.
  • Must not change the interface in any way.
  • May add methods to your Data class if you want to.
  • Alternatively you may add methods to a class that extends Data class.
  • Do not have to use all the methods of Data class in your GUI.
    Regards, Andrew
  •  
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: NX: Contractors Search
     
    Similar Threads
    URLyBird : about the requirement of search function.
    NX:find method - please help
    UrlyBird Functional Requirements
    find method in B&S
    Exact match and starts with