-
Notifications
You must be signed in to change notification settings - Fork 0
/
Seat.java
34 lines (27 loc) · 810 Bytes
/
Seat.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
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.lang.*;
import java.awt.*;
public class Seat extends JButton {
public static int[] PRICING = {74, 47, 32, 19};
private byte section;
private char row;
private byte number;
private boolean selected;
public boolean[] sold;
public Seat(byte s, char r, byte n) {
section = s;
row = r;
number = n;
selected = false;
sold = new boolean[4];
}
public byte getSection() { return section; }
public char getRow() { return row; }
public byte getNumber() { return number; }
public int getPrice() { return PRICING[section-1]; }
public boolean isSelected() { return selected; }
public void setSecleted(boolean s){ selected = s; }
public boolean getSold(int x) {return sold[x];}
}