Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

cinema booking system

807607Jan 13 2007 — edited Jan 15 2007
erm i am a newbie in java,i am doing a cinema booking system,for the seat domain class can help me check whether my method put correctly,for my seat domain i wan to have 100 seat for each theatre,n each seat will contain customerid if booked.
can help me check whether my method put correctly pls

Seat

public class Seat {

public static final boolean AVAILABLE=true;
public static final boolean BOOKED=false;

private String seatID;
private boolean status;
private String customerID;

public Seat(String seatID,String customerID)
{
this.seatID=seatID;
this.customerID=customerID;
status=AVAILABLE;

}
public String getSeatid(){
return seatID;
}
public void setStatus(boolean status) {
this.status=status;
}
public void doBooking(String customerID) {
status = false;
this.customerID = customerID;
}
public void unBooking() {
status = true;
customerID = "";
}
public boolean getStatus() {
return status;
}
public String getCustomerid(){
return customerID;
}
public String toString() {
return "Seat ID="+seatID+"\nStatus:"+status+"\nCustomer ID:"+customerID;
}

}

Message was edited by:
saisai_01988
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 12 2007
Added on Jan 13 2007
25 comments
413 views