if i have an abstract customer class why is it giving me error: package lasthw; public abstract class Customer extends Thread { public int processing(); } dont i just need to declare the method and the subclasses need to implementit?
@eSpeX :)
You have a package declared and it cannot be found in the path of your project.
nope, that doesnt help
it has to do with the return type . since its type INT the customer class itself wnats me to have a return
is it okay if i just make that method ABSTRACT as well?
Slow down a second, one thing at a time. What exactly is the code doing and what exactly is your error message?
i have an abstract class customer. there are subclasses (dealer, teenager, customPerson) and they all have a processing wait time. so i want to have that method in the superclass.
Okay, makes sense.
so is that a yes to the abstract method as well?
Are you defining it within the abstract class?
Err I meant to say, implementing it, I assume it is defined.
yes
Then you do not have to declare your subclass abstract or even worry about implementing the method. All you will need to do is pass a variable to it.
Join our real-time social learning platform and learn together with your friends!