• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Violation of requirement ?

 
Tony Morris
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have this problem:
I have used Sun's SwingWorker.java in my client application, however,
my requirements assert the following:
"You are permitted to use any IDE tool you choose, but you must not
submit any code that is not your own work. The final program must
have no dependencies on any libraries other than those of the Java 2
Platform."
SwingWorker.java
http://java.sun.com/products/jfc/tsc/articles/threads/update.html
Can anyone make any recommendations ?
Possible solutions include:
- leave it as it is and document the fact in choices.txt.
- write the class myself, however, this won't be easy without
duplicating the existing implementation.
- remove any code that relies on it and don't use it - this is my
least favourable option, considering it works so well.
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12007
215
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tony
Welcome to JavaRanch.
Could you please change your displayed name to meet the JavaRanch naming policy. The last name should not be an initial. You can change it here.
The question of whether to use SwingWorker or not was recently discussed in this thread
If you do a search in this forum for "SwingWorker" you will also see previous people's opinions on this.
Regards, Andrew
 
Tony Morris
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Opinions are great and they are very parallel to my opinion.
Does anyone have anything that is more conclusive ?
i.e. "yes it is OK to use SwingWorker.java" or "no it is not"
 
Jack Conway
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SwingWorker is not part of Java 2.
SwingWorker is not your own code.
Therefore it is clear that to use it is an automatic fail.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree. On the other hand, you can consider SwingWorker as an example, and create a similar class in your own code, if you find it useful. That's why the put code in the tutorial after all - to serve as a model for how to do things. Just be sure it doesn't look like you copied the code directly, and that you understand how everything works and why it's there. Putting in good comments to explain this to junior developers is a good way of indicationg this to the grader.
 
Tony Morris
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For anyone interested, the response from Sun:
"I can't advise you as to which option you should choose (the same options in this forum post - TM). However, I can
tell you that using SwingWorker will definitely result in automatic failure."
I'll "roll my own".
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic