Task 2 done
This commit is contained in:
31
src/main/java/Button.java
Normal file
31
src/main/java/Button.java
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user