Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

class diagram - level of details

 
Arkadiusz Ryckowski
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let says there's a case 'a user searches for a car by color and name'. For moderators - it's not my assigment and I belive it's quite general

I'm wondering if I should define method as

Collection findCarsByCriteria()
Collection findCars(Criteria)
Collection findCarsByNameOrColor(String,Color)
findCars()
findCarsByCriteria()

If I choose 1 or 3 should define classes Color or Criteria ?
I think even 5 is ok, it's designer rensposibility to define method sygnatures
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65658
129
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Arek R.", please check your private messages.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!