Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

few questions

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am almost done with the assignment. Couple of questions
1. Do we need to document inner class (Event Handler)
2. Is it OK to use code from SUN example (I used a FilterClass for selecting files)
3. Is it OK to use code from this news group and give credit. Or should re-write it completely.
Thanks for your reply.
Rit Faisal
 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rit, it's me, Tarun.
Good to see you're almost done. I pretty much started a short while ago. I had a question as well, and probably can help you answer the questions you have now:
1. According to the specs from Sun, documentation need only be
limited to design decisions, javadocs, and user docs. If
you are employing the MVC pattern for your GUI (and Swing
relies on it anyway for its components), then you can just
document that.
2. If by "use code from Sun" you mean using the existing API
or freely available code elsewhere or endorsed by Sun or
the JCP (Java Community Process), then that's fine I believe.
You should document, however, why you are using it.
3. If individuals on this forum have provided code for others
to view, it's probably a safe bet that they intended for
others to see it and it's free to use. I would contact
these individuals just in case, however, to tell them you
want to use their code in its existing format and then
include their name within the comments of your code.
If it's ok with them, then no problem I suppose. Sun
seems to endorse open source projects anyway :-)
Now, my question. Did you implement criteriaFind by making use of a linear search algorithm, or did you do something a little more fancy?

Thanks

Originally posted by Rit Faisal:
I am almost done with the assignment. Couple of questions
1. Do we need to document inner class (Event Handler)
2. Is it OK to use code from SUN example (I used a FilterClass for selecting files)
3. Is it OK to use code from this news group and give credit. Or should re-write it completely.
Thanks for your reply.
Rit Faisal


 
author
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't be fancy. Implement criteriaFind using linear search. After all the normal find uses it as well.
- Peter
 
Rit Faisal
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tarun:
Thanks for your comments. I just used a linear search in criteriaFind().
-Rit
 
A tiny monkey bit me and I got tiny ads:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic