Hi Richard,
The code you have provided looks reasonable.
In the no argument constructor, what would be the values of the class variables if you did not explicitly set them?
1.I prepare to add toString() method to return specified record.
That is up to you - do you have any cases where you will want to have a String representation of the object?
2.Do I have to add DiscountRoom getDiscountRoom(String criteria) method to return a room object when I want to search name and/or location record?
That sounds reasonable - I assume your addDiscountRoom() would take an instance of the DiscountRoom class as a parameter and then it would call the necessary methods in the Data class to do the real addition. Likewise the getDiscountRoom() method would call the necessary methods in the Data class to get the room or rooms and then return a DiscountRoom array for the results.
If possible,do you think what things it need yet?
You
might also want a way of getting the schema (but then again you might not). Design decision time
Regards, Andrew