The example you are giving is clearly violating SOLID principles ( Interface Segregation principle) .If both extended classes doesnt need buildBathrooms() why it is in parent interface. Though you are saying its a class but it looks like an interface. correct me if i am wrong
Type your question above this line.
Course: https://www.educative.io/collection/5307417243942912/5631943370604544
Lesson: https://www.educative.io/collection/page/5307417243942912/5631943370604544/5723151296102400