diff --git a/src/encapsulationInheritancePolymorphism/inheritance/ElectricEngine.java b/src/encapsulationInheritancePolymorphism/inheritance/ElectricEngine.java new file mode 100644 index 0000000..9d48a3e --- /dev/null +++ b/src/encapsulationInheritancePolymorphism/inheritance/ElectricEngine.java @@ -0,0 +1,5 @@ +package encapsulationInheritancePolymorphism.inheritance; + +public class ElectricEngine extends Engine { + private String batteryType; +} diff --git a/src/encapsulationInheritancePolymorphism/inheritance/Engine.java b/src/encapsulationInheritancePolymorphism/inheritance/Engine.java new file mode 100644 index 0000000..2e315da --- /dev/null +++ b/src/encapsulationInheritancePolymorphism/inheritance/Engine.java @@ -0,0 +1,5 @@ +package encapsulationInheritancePolymorphism.inheritance; + +public class Engine { + private int power; +} diff --git a/src/encapsulationInheritancePolymorphism/inheritance/Main.java b/src/encapsulationInheritancePolymorphism/inheritance/Main.java new file mode 100644 index 0000000..e4ed9d0 --- /dev/null +++ b/src/encapsulationInheritancePolymorphism/inheritance/Main.java @@ -0,0 +1,7 @@ +package encapsulationInheritancePolymorphism.inheritance; + +public class Main { + public static void main(String[] args) { + ElectricEngine electricEngine = new ElectricEngine(); + } +}