Hello
I need help on how to approach the solution to the problem, rather than actual code.
In my assignment I have a class called VehicleRecord which has two fields:
String registrationDate and String expiryDate.
This class must include validation methods (for validating the data supplied by the user for the fields) and I have to use the following method signature;
.
The above validation method has to be used for validating two different dates, registrationDate and expiryDate (both with the same validation parameters : 4 digits (MMDD) date range = 0181 -> 1220) after the user has supplied them but [ITALIC]before[/ITALIC] the supplied data is passed to the respective field.
I have coded the actual validation and it works fine.
The problem I have is that the method signature does not allow for any returned value. Due to this, I do not see a way that the validation method can tell which date it is validating, so the following cannot happen...
... because which fields date is the method validating.
I am restricted by the terms of the assignment but if I were not, I would go about it as follows (in fact I have and this approach works fine).
... but I cant use the above approach.
Can anyone suggest a way to approach this problem?
Thank you
[ July 22, 2004: Message edited by: Darren Wilkinson ]