Dynatrace interview question

2 Java exercises. General concepts about OOP.