• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I catch a mistake in the specification

 
Rudy Yeung
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will consider this as a mistake. In the criteriaFind() implementation, it mentions by example that the method should be able to accept the argument string "Carrier='SpeedyAir',Origin='SFO'". Strictly speaking, there is no such field name as "Origin" in the database. The correct form should be written as "Carrier='SpeedyAir',Origin Airport='SFO'". The method I implement will return field name not found message. This is my thought.
 
Sam Wong
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the format of the message was the intent of the example, not the actual content. You're right in that Origin does not exist and it would return 0 data. You're throwing an exception which is fine. I don't have the assignment available in front of me right now but I thought it stated that any errors in the search criteria string should yield the same behavior as an empty result set.
 
Jeff Young
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rudy,
I think the Sun example was just that - an example. In my assignment (where we have to do a data conversion utility), the specific field names are specified by the developer anyway. Sam is correct in that the spec says when "an invalid field name being provided as part of the criteria the behavior of this method is the same as if no records matching correctly specified criteria" were found. Not sure about your "message" approach in that case, since if no records are found I would just return a null array not any type of message.
Jeff
 
Rudy Yeung
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What data conversion in the assignment you are refering to? I cannot find anything related to data conversion in the specification. Do I miss something in my assignment?
Rudy
 
Jeff Young
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Probably not. As I understand it there are 2 versions of the FBN assignment - one where you are supplied a text file and you need to write a conversion routine to generate a binary file and one where the binary file is supplied. I have the first one and had to write the conversion program. In doing so, the field names are not specified and I could call them whatever I wanted, so that's why I think the example from Sun is just a guideline as far as the exact field names.
Jeff
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic