Hi,
I'm somehow stuck with the last requirement.
If I let Boss inherit from HasManagementPotential, the system complains "Boss must inherit from Person-Interface".
If I let Boss inherit from Person, it complains "Boss must inherit from HasManagementPotential-Interface".
And that although my HasManagementPotential-Interface already inherits from Person.
What am I missing out?
Thanks in advance,
Daniel
package de.codegym.task.task13.task1310;
/*
Zukünftiger Manager
*/
public class Solution {
public static void main(String[] args) {
}
interface Person {
void use(Person person);
void startToWork();
}
interface HasManagementPotential extends Person{
boolean inspiresOthersToWork();
}
interface Secretary extends Person{
}
interface Boss extends HasManagementPotential {
}
class Manager implements Boss{
public void use(Person person) {
person.startToWork();
}
public void startToWork() {
}
public boolean inspiresOthersToWork() {
return true;
}
}
class Subordinate implements Secretary{
public void use(Person person) {
}
public void startToWork() {
}
}
}