update polymorphism example

This commit is contained in:
Oleksii Aleshchenko
2023-03-02 15:48:38 +02:00
parent 429bcc7b3d
commit f692ae7588
4 changed files with 31 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ package encapsulationInheritancePolymorphism.polymorphism;
public class ElectricEngine extends Engine {
private String batteryType;
@Override
public int getPower() {
return 20;
}