Applied Materials interview question

Writing an abstract class in java which generalizes the previous one.