forked from nus-cs2103-AY2324S1/ip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Command.java
43 lines (39 loc) · 1.14 KB
/
Command.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package jeo.command;
import jeo.exception.JeoException;
import jeo.storage.Storage;
import jeo.task.TaskList;
import jeo.ui.Ui;
/**
* Represents a command for the Je-O chatbot.
*
* @author Joseph Oliver Lim
*/
public abstract class Command {
private boolean systemStatus;
/**
* Constructs a command.
*
* @param systemStatus A boolean value to indicate whether the system has exited.
*/
protected Command(boolean systemStatus) {
this.systemStatus = systemStatus;
}
/**
* Executes the command.
*
* @param tasks The TaskList where the command is to be executed.
* @param ui The Ui that functions as user interface.
* @param storage The Storage that functions to store data.
* @return A String to be shown to the user after the command is executed.
* @throws JeoException If the execution of the command fails.
*/
public abstract String execute(TaskList tasks, Ui ui, Storage storage) throws JeoException;
/**
* Returns the system status.
*
* @return The system status.
*/
public boolean getSystemStatus() {
return systemStatus;
}
}