School Commit Init

This commit is contained in:
2024-08-31 12:07:21 +03:00
commit 0b130ee18c
2801 changed files with 4720552 additions and 0 deletions
@@ -0,0 +1,17 @@
package Views.Commands;
public abstract class Command {
private String key;
private String description;
public Command (String key, String description) {
this.key = key;
this.description = description;
}
public abstract void execute();
public String getKey() {
return this.key;
}
public String getDescription() {
return this.description;
}
}
@@ -0,0 +1,12 @@
package Views.Commands;
public class ExitCommand extends Command {
public ExitCommand(String key, String description) {
super(key, description);
}
@Override
public void execute() {
System.exit(0);
}
}
@@ -0,0 +1,16 @@
package Views.Commands;
import Controllers.Controller;
public class RunExampleCommand extends Command {
private Controller controller;
public RunExampleCommand(String key, String description, Controller controller) {
super(key, description);
this.controller = controller;
}
@Override
public void execute() {
this.controller.allSteps();
}
}