ryan burgdorfer

Ranch Hand
+ Follow
since Jan 24, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by ryan burgdorfer

If the method getMyColor() is the same in each of your 10 classes, which it sounds like is true, it would be best to define an interface with the method defined there. As long as your classes implement the interface, I *think* you don't need to provide the method getMyColor() within them. They will implicitly have it since they implement the interface. Could someone verify/correct me on this?
If the method definitions are different at all between your 10 classes, an abstract super-class would be best, with the method getMyColor() declared abstract with no definition. Then you are forced to define the method in each class extending the super-class. I have described the interface way above...the way you would do it using an abstract super-class is very similar:
Declare your abstract super-class, with one abstract method in it named getMyColor() (with no definition). All your other classes already define that method, so the only change needed for them is to make them extend SuperClass. Then, in your method newClass, just pass in the name of your abstract super-class.
Very little difference from using an interface, as you can see. I think using an interface would still be your best bet though, at least for future re-usability or adding onto your code, if nothing else.
Anyone else have any comments on this? I'm definitely no expert on the matter by any means, and would appreciate clarification/verification myself
------------------
  • Ryan Burgdorfer
  • Java Acolyte


  • [This message has been edited by ryan burgdorfer (edited April 28, 2001).]
16 years ago
A buffered reader/writer will definitely be a huge performance increase over the non-buffered versions. The exact type depends on the type of data being read/written. But for optimum performance, I would suggest accessing a database via JDBC.
------------------
  • Ryan Burgdorfer
  • Java Acolyte
16 years ago
Assignment: OOP-2 (NaturalLanguageMultiply)
Attempt: 4

I have a good feeling about this one being the final submission...no really, this time I mean it :fingers crossed (again):

------------------
  • Ryan Burgdorfer
  • Java Acolyte
16 years ago
BTW, where are you getting all the extra names from? The list given for the assignment has 8 names...
First req.: Sort and output the list by FIRST names.
Second req.: Sort and output the list by LAST names.
Thus your program will output 2 lists of 8 names each, the first sorted by first name and the second sorted by last name.
------------------
  • Ryan Burgdorfer
  • Java Acolyte
16 years ago
That is what the first requirement says it should do...but the second requirement says that it also needs to sort/output the list by LAST names. To do that, you need to make a new class that implements a certain interface...if you look around the API, on the pages for the classes used for the first requirement, yuo will find a reference to the interface you need to use to do the second "last name" sort.
------------------
  • Ryan Burgdorfer
  • Java Acolyte
16 years ago
Marilyn,
Thanks for the reply (and the email).
4:30am wake-time?!? Ouch...
And I thought my shift was bad! (7pm-3:30am) Actually, I really like my hours, b/c I get to sleep in without having to wake up and go directly to work. Plus, even after waking up around 1 or 2pm, I have plenty of time to run errands within normal business operating hours.
I have always been nocturnal, this shift suits me well. Now, if only I could get involved in more java dev work on this shift.
Anyway, I digress...
Looking forward to hearing from you Marilyn (and your nits),
------------------
  • Ryan Burgdorfer
  • Java Acolyte
16 years ago
You need to use either an abstract class or an interface. I would use an interface, with one method in it called getMyColor(). Then, make all your 10 classes implement that interface. As long as they all define that method (which you already stated, they do) you then define newClass like this:

Note that instead of passing an Object into newClass, you pass in the type of interface that all your classes have implemented. This is interpreted as "any object type that implements the interface".
16 years ago
Marilyn,
Have you not received my latest submission? If not, let me know ASAP so I can get it in line for nitpicking...
Thanks,
------------------
  • Ryan Burgdorfer
  • Java Acolyte
16 years ago
Umesh,
I assume (from your code) that you also got a ton of style-guide nitpicks?
(i.e. lots of "spacing...", etc.)
16 years ago
It sounds like you got the first part to work fine (the easy part)...but you make no mention of the last-name sort. Have you done that part yet? That is where you need to implement a particular interface.
------------------
  • Ryan Burgdorfer
  • Java Acolyte
16 years ago
The way I implement this is as follows:
I have all the assignments done in advance, up to the first Servlets assignment. (This gives you something to do between nitpicks initially). Whenever I get back a nitpick on an assignment, I go through all the ones I have already completed and see if any of the nitpicks apply, and make the necessary changes. This improves the quality of all the assignments before I send them in, reducing the number of nitpicks I would have gotten had I not went through and revised them.
Just like Peter's post.
------------------
  • Ryan Burgdorfer
  • Java Acolyte
16 years ago
Just what I was looking for.
Thanks, Carl.
16 years ago

Originally posted by ramani natarajan:
Friends,
There is a way out of this predicament. Go to the hundreds of independent professional sites that list contract work by the thousands. Pick a project, submit your bid and work(preferably pick java jobs) as you are learning for your java certification.
Ramani


What makes you all think that he will go through the work of compiling a list of such sites, and emailing it to every one of you? Or even post it here?
Let me give you all a clue: Go to a search engine and locate the sites YOURSELVES...
(You don't need me to post a list of search engine sites, now do you? )
------------------
  • Ryan Burgdorfer
  • Java Acolyte
16 years ago
I think this is a great suggestion as well, Map. It will, theoretically, increase the number of expert answers in a given forum. Just like in the case of Johannes' friend, who heard of the book giveaways, and began posting as a result.
There are very few drawbacks to this, if any. And the benefit of increasing the number of quality answers far outweighs what few negative aspects there are to this idea.
IMH(ranch-hand)O, of course
------------------
  • Ryan Burgdorfer
  • Java Acolyte
16 years ago