• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

abstract class

 
Victoria Preston
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having a problem...I have to take a program I have already written and make it abstract. I thought I had it but it won't compile it doesn't like the following code.....

any tips would help
 
Garrett Rowe
Ranch Hand
Posts: 1296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont understand why you are instantiating a new Employee in your compareTo method at all.
 
Victoria Preston
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
really....what should it say something like the following...

 
Garrett Rowe
Ranch Hand
Posts: 1296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Victoria Preston:
really....what should it say something like the following...


I believe that will achieve the result you intended, however remember '=' is for assignment and '==' is for comparison.
 
Garrett Rowe
Ranch Hand
Posts: 1296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looking at this method again, you could actually trim it down to one line
 
Victoria Preston
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks alot.....that fixed that probelm....severl more to go.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic