Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CoffeRobot.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
public class CoffeRobot extends Robot {

@Override
public void work(){

System.out.println("Я coffeRobot – я варю каву");}

}
17 changes: 17 additions & 0 deletions Main.java
Original file line number Diff line number Diff line change
@@ -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();

}
}
20 changes: 20 additions & 0 deletions Robot.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
public class Robot {



public void work() {



System.out.println("Я robot - я просто працюю");


}


}





9 changes: 9 additions & 0 deletions RobotCooker.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
public class RobotCooker extends Robot{

@Override
public void work(){

System.out.println("Я robotCooker – я просто готую");}


}
7 changes: 7 additions & 0 deletions RobotDancer.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
public class RobotDancer extends Robot {
@Override
public void work(){

System.out.println("Я robotDancer – я просто танцюю");}

}