Task 2 done

This commit is contained in:
2023-10-18 10:50:21 +02:00
parent da1a8a2166
commit 67e0ffad03
6 changed files with 324 additions and 0 deletions

31
src/main/java/Button.java Normal file
View File

@@ -0,0 +1,31 @@
public class Button {
private String text; // Text of button.
private int irCode; // IR code of button.
/**
* Constructor. Initializes text and IR code.
* @param text Text of button.
* @param irCode IR code of button.
*/
public Button(String text, int irCode) {
this.text = text;
this.irCode = irCode;
System.out.println("New button: " + text + " " + irCode);
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public int getIrCode() {
return irCode;
}
public void setIrCode(int irCode) {
this.irCode = irCode;
}
}