package domain;
-import java.io.*;
+import java.io.Serializable;
import java.util.Date;
-import businessLogic.BookingManager;
-
-@SuppressWarnings("serial")
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;
- //Booking date is assigned to actual date
- this.bookingDate= new java.util.Date(System.currentTimeMillis());
- this.isPaid=false;
+ this.client = client;
+ // Booking date is assigned to actual date
+ this.bookingDate = new java.util.Date(System.currentTimeMillis());
}
-
- public void imprimete(){
- System.out.println(bookingNumber);
- System.out.println(isPaid);
- System.out.println(bookingDate);
- System.out.println(telephone);
- System.out.println(offer);
+
+ public Booking(int bN, Offer offer, Client client, Date bookDate) {
+ this.bookingNumber = bN;
+ this.offer = offer;
+ this.client = client;
+ this.bookingDate = bookDate;
}
public int getBookNumber() {
return this.offer;
}
- public float getPrice() {
- return this.offer.getPrice();
- }
-
public void setBookDate(Date bookDate) {
this.bookingDate = bookDate;
}
public Date getBookDate() {
return this.bookingDate;
}
-
- public void setTelephone(String telephone) {
- this.telephone = telephone;
- }
- public String getTelephone() {
- return this.telephone;
- }
-
- public void paid() {
- this.isPaid = true;
+ public Client getClient() {
+ return client;
}
- public void notPaid() {
- this.isPaid=false;
+ public void setClient(Client client) {
+ this.client = client;
}
- public boolean isPaid() {
- return isPaid;
- }
-
}
\ No newline at end of file