Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Button {
- int num;
- int size;
- String color;
- public Button(int num) {
- this.num = num;
- this.size = 5;
- this.color = "black";
- }
- public Button(int num, int size, String color) {
- this.num = num;
- this.size = size;
- this.color = color;
- }
- public int getSize() {
- return size;
- }
- public void addToSize(int x) {
- this.size += x;
- }
- public boolean isSameSize(Button other) {
- if(this.size == other.getSize())
- return true;
- return false;
- }
- }
Add Comment
Please, Sign In to add comment