3 Replies
the constructor for the
Worker
class requires two parameters which you have not provided
it needs some int
for the id and another int
for the number of years in the parenthesesWhen a class doesn’t declare a constructor with no parameters, you can’t use a constructor with no parameters. That includes object initialization
If you want to do that, in the worker class you need
yup i fixed it
thank you so much guys