diff --git a/CoffeRobot.java b/CoffeRobot.java new file mode 100644 index 0000000..2e0221b --- /dev/null +++ b/CoffeRobot.java @@ -0,0 +1,8 @@ +public class CoffeRobot extends Robot { + + @Override + public void work(){ + + System.out.println("Я coffeRobot – я варю каву");} + +} diff --git a/Main.java b/Main.java new file mode 100644 index 0000000..275ed7c --- /dev/null +++ b/Main.java @@ -0,0 +1,17 @@ +public class Main { + + public static void main(String[] args) { + + + Robot robot = new Robot(); + CoffeRobot coffeRobot = new CoffeRobot(); + RobotDancer robotDancer = new RobotDancer(); + RobotCooker robotCooker = new RobotCooker(); + + robot.work(); + coffeRobot.work(); + robotDancer.work(); + robotCooker.work(); + + } +} diff --git a/Robot.java b/Robot.java new file mode 100644 index 0000000..8f83a51 --- /dev/null +++ b/Robot.java @@ -0,0 +1,20 @@ +public class Robot { + + + + public void work() { + + + + System.out.println("Я robot - я просто працюю"); + + + } + + +} + + + + + diff --git a/RobotCooker.java b/RobotCooker.java new file mode 100644 index 0000000..08418bc --- /dev/null +++ b/RobotCooker.java @@ -0,0 +1,9 @@ +public class RobotCooker extends Robot{ + + @Override + public void work(){ + + System.out.println("Я robotCooker – я просто готую");} + + +} diff --git a/RobotDancer.java b/RobotDancer.java new file mode 100644 index 0000000..47e80e2 --- /dev/null +++ b/RobotDancer.java @@ -0,0 +1,7 @@ +public class RobotDancer extends Robot { + @Override + public void work(){ + + System.out.println("Я robotDancer – я просто танцюю");} + +}