Yea sorry I phrased that wrong.. I rewrote my code and my print method that I overrode was no longer called putEmp(). Basically the same though. Thanks again for the help
Type: Posts; User: Stockholm Syndrome
Yea sorry I phrased that wrong.. I rewrote my code and my print method that I overrode was no longer called putEmp(). Basically the same though. Thanks again for the help
Thanks for the help I solved it by making a new print method in class Employee and then overriding it in the subclass Tradesman.
How do I do that?
But how would I use it? For instance in put(), if i use putTrade() instead of putEmp() I will get an error any time I try to print an employee without a trade as they have different parameters
Hey, just moved onto inheritance in college and was working through our first exercise sheet when I got this problem. For the exercise, we have to write a class encapsulating the notion of an...