import java.io.Serializable;
import java.util.Date;
-@SuppressWarnings("serial")
-public class Booking implements Serializable {
+public class Booking implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
private int bookingNumber;
private boolean isPaid;
private Date bookingDate;
- private String telephone;
+ private Client client;
private Offer offer;
public Booking() {
}
- public Booking(int bN ,String telephone, Offer offer) {
+ public Booking(int bN , Offer offer,Client client) {
this.bookingNumber = bN;
- this.telephone=telephone;
this.offer = offer;
- //this.price = price;
+ this.client=client;
//Booking date is assigned to actual date
this.bookingDate= new java.util.Date(System.currentTimeMillis());
this.isPaid=false;
System.out.println(bookingNumber);
System.out.println(isPaid);
System.out.println(bookingDate);
- System.out.println(telephone);
- System.out.println(offer);
+ System.out.println(client.toString());
+ System.out.println(offer);
}
public int getBookNumber() {
return this.bookingDate;
}
- public void setTelephone(String telephone) {
- this.telephone = telephone;
- }
-
- public String getTelephone() {
- return this.telephone;
- }
-
public void paid() {
this.isPaid = true;
}
return isPaid;
}
+
+
+ public Client getClient() {
+ return client;
+ }
+
+ public void setClient(Client client) {
+ this.client = client;
+ }
+
}
\ No newline at end of file