Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package cinemabooking;
- /**
- *
- * @author hypesystem
- */
- public class Seat {
- private int x, y;
- private boolean is_booked;
- public Seat(int x, int y, boolean is_booked) {
- this.x = x;
- this.y = y;
- this.is_booked = is_booked;
- }
- public int getX() {
- return x;
- }
- public int getY() {
- return y;
- }
- public boolean isBooked() {
- return is_booked;
- }
- @Override
- public String toString() {
- String bkd = "AVAIL";
- if(isBooked()) bkd = "BOOKD";
- return "SeatR"+x+"S"+y+bkd;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment